Hello, can somebody help me fixing this no errors in debug, this suppose to add +1 point for every weapon stat when you kill a player, like example when i kill somebody with m4 i earn 1 point to m4 etc
here is the code and thanks
addEventHandler("onZombieWasted", root,
function (killer, weapon ,bodypart)
if (killer and getElementType(killer) == "player" and killer ~= source) then
local Acc = getAccountName ( acc )
for i = 21 , 25 do
getPedStat(source,i,getAccountData(Acc, "stat."..i))
end
for i = 69 , 79 do
getPedStat(source,i,getAccountData(Acc, "stat."..i))
end
for i = 21 , 25 do
setPedStat(source,i,+1)
end
for i = 69 , 79 do
setPedStat(source,i,+1)
end
end
end)