Hermes
dziwki kola gramy w lola
Hi there!
I am trying to make skull and frag remover on 0.3.6. But it's not working as it should. It removes skull but frags are still there.
I have no idea how it works now.
Maybe someone knows..?
Thanks in advance,
Hermes
I am trying to make skull and frag remover on 0.3.6. But it's not working as it should. It removes skull but frags are still there.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local data = {
skull = getCreatureSkullType(cid),
useLog = "true"
}
if(data.skull == SKULL_RED or data.skull == SKULL_BLACK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your skull has been taken off!")
doCreatureSetSkullType(cid, SKULL_NONE)
doRemoveItem(item.uid, 1)
if(getBooleanFromString(data.useLog) == true) then
doWriteLogFile("./data/logs/removeskull.log", "\nSuccess: " .. getCreatureName(cid))
end
doPlayerSetRedSkullTicks(cid, -getPlayerRedSkullTicks(cid))
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 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
else
doPlayerSendCancel(cid, "Sorry, you don't have skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return true
end
I have no idea how it works now.
Maybe someone knows..?
Thanks in advance,
Hermes