Hello
function deanimated( ammo, attacker, weapon, bodypart )
if (attacker) then
if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then
if (getElementData (source, "zombie") == true) then
local oldZcount = getElementData ( attacker, "Zombie kills" )
if oldZcount ~= false then
setElementData ( attacker, "Zombie kills", oldZcount+1 )
triggerEvent ( "onZombieWasted", source, attacker, weapon, bodypart )
else
setElementData ( attacker, "Zombie kills", 1 )
triggerEvent ( "onZombieWasted", source, attacker, weapon, bodypart )
end
end
end
end
end
addEventHandler("onPedWasted", root, deanimated)
if you want to use convertNumber use it when showing the data not with setElementData.
Cheers!