local config =
{
item = 8983,
count = 1
}
function onSay(cid, words, param)
if getPlayerItemCount(cid, config.item) >= config.count then
doPlayerRemoveItem(cid, config.item, config.count)
doPlayerSetRedSkullTicks(cid, 0)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Tus frag ya fueron liberadas.")
else
doPlayerSendCancel(cid, "You dont have this item.")
end
return TRUE
end
that's not even in the scriptBro doesn't Work.
My player are black skull and use the item 8983 and say this:
that's not even in the script
Yes, it is.
<action itemid="XXXX" event="script" value="red_skull.lua"/>
function onUse(cid, item, frompos, item2, topos)
local nonremskulls = -- These are the skulls it cant remove. If player has any of these, the rune wont work.
{
white = SKULL_WHITE
}
if isInArray(nonremskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"You can't remove this type of skull.")
doSendMagicEffect(getPlayerPosition(cid),2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid,0)
doPlayerSendTextMessage(cid,27,"Your frags & your skull have been removed, thank you for donating!")
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
doSendAnimatedText(getPlayerPosition(cid), "Skull removed!", 180)
doRemoveItem(item.uid, 1)
doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
return TRUE
end
end
local nonremskulls = -- These are the skulls it cant remove. If player has any of these, the rune wont work.
{
white = SKULL_WHITE
}
local nonremskulls = {SKULL_WHITE} -- These are the skulls it cant remove. If player has any of these, the rune wont work.