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:
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