• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Guild frag system

mayel

New Member
Joined
Sep 11, 2009
Messages
174
Reaction score
2
Location
Stockholm, Sweden
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:
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
And this is my XML script:
Code:
<event type="kill" name="Custom" event="script" value="custom.lua"/>
 
Back
Top