mayel
New Member
Well I'm havin this problem that I can't get the onKill() function to work.
And if u wonder, I'm making a guild frag system.
This is my script:
And this is my XML script:
And if u wonder, I'm making a guild frag system.
This is my script:
Code:
function onKill(cid, target, lastHit)
if(lastHit and isPlayer(target) and getPlayerLevel(target) >= 250) then
if getPlayerGuildId(cid) > 0 then
db.executeQuery("UPDATE `guilds` SET `frags` = `frags` + 1 WHERE `id` = " .. getPlayerGuildId(cid) .. ";")
end
end
return true
end
Code:
<event type="kill" name="Custom" event="script" value="custom.lua"/>