function onUse(cid, item)
if not getTileInfo(getThingPos(cid)).protection then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.")
return true
end
if getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_black then
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
db.executeQuery("UPDATE `players` SET `skulltime` = 0")
doCreatureSetSkullType(cid, 0)
doPlayerSendTextMessage(cid, 19, "Você removeu seus Frags/Skull com sucesso.")
doSendMagicEffect(getThingPos(cid), 26)
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your skull has been removed!")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red/black skull!")
end
return true
end
Pergunta
rato777 0
Olá, gostaria de uma ajuda.
gostaria de adaptar esse codigo: do @Summ
function onUse(cid, item) if not getTileInfo(getThingPos(cid)).protection then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.") return true end if getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_black then db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") db.executeQuery("UPDATE `players` SET `skulltime` = 0") doCreatureSetSkullType(cid, 0) doPlayerSendTextMessage(cid, 19, "Você removeu seus Frags/Skull com sucesso.") doSendMagicEffect(getThingPos(cid), 26) doRemoveItem(item.uid,1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your skull has been removed!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red/black skull!") end return true end
Para Revscript Ot 12.61 que nao utiliza Actions.xml
Desculpa se esta na área errada.
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados