• 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!

TFS 0.X Frag Remover

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
Hi guys,

I have this action who remove skills and frags, but i have one problem. I use item and frags and skull gone, but when i relog red skull come back, can u guys help me to fix?

Lua:
-- Scripted by Leon Zawodowiec --
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_STATUS_CONSOLE_BLUE, "You can't remove that 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
Post automatically merged:

Looking a little more and found this, solved. Thanks.

 
Last edited:
Back
Top