Hi!
I'm trying to make a script counting how many times i killed for example Rotworm
I was trying to remake few task scripts from forums but unsuccesfully
Here's my script, hope u can help me
I'm trying to make a script counting how many times i killed for example Rotworm
I was trying to remake few task scripts from forums but unsuccesfully
Here's my script, hope u can help me
Code:
function onKill(cid, target)
local StorageValue = 40001
local Creature = "Rotworm"
local CreaturesKilled = getPlayerStorageValue(cid, StorageValue)
if CreaturesKilled < 0 then
setPlayerStorageValue(cid, StorageValue, 0)
end
if getCreatureName(target) == Creature then
setPlayerStorageValue(cid, StorageValue, CreaturesKilled + 1)
else
return false
end
return true
end