function onThink(cid)
if getPlayerStorageValue (cid, 1234) == -1 then
if getPlayerFrags(cid) >= 500 then
setPlayerStorageValue (cid, 1234, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `name` = '[PRO] " .. getCreatureName(cid) .. " ' WHERE `id` = " .. getPlayerGUID(cid))
end
end
return true
end
function onThink(cid)
if getPlayerStorageValue (cid, 1234) == -1 then
if getPlayerFrags(cid) >= 500 then
setPlayerStorageValue (cid, 1234, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `name` = '[PRO] " .. getCreatureName(cid) .. " ' WHERE `id` = " .. getPlayerGUID(cid))
end
end
return true
end
It will keep executing and kicking a player every second after reaching 500 frags.Know my grace
Lua:function onThink(cid) if getPlayerFrags(cid) >= 500 then doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `name` = '[PRO] " .. getCreatureName(cid) .. " ' WHERE `id` = " .. getPlayerGUID(cid)) end return true end
You can use other function, this is to CREATURESCRIPTS and make sure you have getPlayerFrags function.