Elox
http://elox.se/
Hello!
I've always had a Frag nugget system on my server but since they changed the deathlist system, it stopped working. (TFS 0.3.6)
When a player kills another player that is level 120+ he should get a Frag nugget.
I've tried using onKill function but apparently I'm a retarded scripter. eace:
I tried to do a new one with onKill, but can't get it to work.
This script might be 100% retarded, but well I post it anyway.
What am I doing wrong? I get no errors or anything.
Used "onDeath" function before, but as you probably know they have changed it.
Help appreciated!
I've always had a Frag nugget system on my server but since they changed the deathlist system, it stopped working. (TFS 0.3.6)
When a player kills another player that is level 120+ he should get a Frag nugget.
I've tried using onKill function but apparently I'm a retarded scripter. eace:
I tried to do a new one with onKill, but can't get it to work.
Code:
function onKill(cid, target, lastHit)
if (isPlayer(lastHit) == TRUE) and (getPlayerLevel(cid) >= 120) then
local item = doPlayerAddItem(lastHit, 2157, 1)
doItemSetAttribute(item, "description", "It's a trohpy you gained for killing " .. getCreatureName(cid) .." when he was level "..getPlayerLevel(cid)..".")
end
return TRUE
end
This script might be 100% retarded, but well I post it anyway.
What am I doing wrong? I get no errors or anything.
Used "onDeath" function before, but as you probably know they have changed it.
Help appreciated!