Whenever I try to create a code that makes attacker will gain HP when they get a kill, it always heal towards the victim.
1
2
3
4
5
6
2
3
4
5
6
function codeKill(id,killer,victim) 	if lifesteal[id] > 0 then 		parse("sethealth "..victim.." "..(player(victim,"health")+lifesteal[id])) 		msg(player(victim,"name").." had his health restored.") -- this line acts like debug 	end end
Regardless the position of 'victim' and 'killer', it always point towards the dead.
edited 1×, last 01.06.15 07:58:08 am