• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Frag Remover not working. Help please!

gerard95

Keep cool :)
Joined
Dec 31, 2011
Messages
276
Reaction score
16
Once a player has red skull, he/she can use a frag remover, it actually removes the red skull, though, once the player relogs, he/she still has red skull.

Any ideas? Thank you.

Script:
LUA:
function onUse(cid, item, frompos, item2, topos)
        local playerskull = getCreatureSkullType(cid)
        local skulls = {
                                        SKULL_NONE,
                                        SKULL_YELLOW,
                                        SKULL_GREEN,
                                        SKULL_WHITE
                                        }

        if isInArray(skulls, playerskull) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have red or black skull.")
                return 0
        else
                doCreatureSetSkullType(cid, skulls[1])
                doRemoveItem(item.uid, 1)
                db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your skull has been removed.")
        end
        return true
end
 
Back
Top