edited 1×, last 02.09.15 12:39:23 pm
Forum
CS2D Scripts Some error with a specific scriptSome error with a specific script
6 replies 1
Say whats actually wrong, whats not working,etc.
Also say if it is a private zm script if not send me the link,
I would take a look.
Ajmin has written
Ofcourse u wont get a solution unless u explain it,
Say whats actually wrong, whats not working,etc.
Say whats actually wrong, whats not working,etc.
I actually did.
Ajmin has written
Also say if it is a private zm script if not send me the link,
It's not.
Ajmin has written
I would take a look.
Hands off.
Die hook has written
killer, victim, bla bla
So, you died by anyway except by players, the killer will be 0.
And it's killer, victim. Not victim, killer.
The problem is pretty much fixed, but there still is an error.
I'm pretty sure it's the function that kills players if their HP stat is 0 or lower.
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
if stat == "health" then 	if getStat(id, 'health') <= 0 then 		setStat(id, 'health', getStat(id, 'maxhealth')) 		if not itemtype == nil then 			parse('customkill '..source..' '..itemtype(wpn, 'name')..' '..id) 		else 			parse('customkill 0 "NPC" '..id) 		end 	end 	updateHud(id, stat, 1, 24, 240) end
This is what I made of it now. Apparently the item type is "no kill message" (value 250)
The problem might not be about the health stat, more like the maxhealth stat? Not sure about that, tho. And the spawn function DOES work if you do the same in it as in the die func... I could try removing the adding of health there.
EDIT: The problem definitely is in the die function. I removed it and theres no error anymore, plus the spawn function has the exact same use. It might very well be possible that the ID is the problem...
1