Figaro
Banned User
Im asking red skull remover script wich cost 10cc, Example: You use lever, it removes your red skull and 10cc, and if u dont have red skull it just says:" You dont have red skull". Hope somebody can help 
Im asking red skull remover script wich cost 10cc, Example: You use lever, it removes your red skull and 10cc, and if u dont have red skull it just says:" You dont have red skull". Hope somebody can help![]()
function onUse(cid, item, fromPosition, itemEx, toPosition)
cc = 10 -- How much Crystal Coins does it cost?
money = 100*100*cc
if item.itemid == 1945 and getCreatureSkullType(cid) > 1 then
if doPlayerRemoveMoney(cid, money) == true then
doCreatureSetSkullType(cid, 0)
doTransformItem(item.uid, item.itemid + 1)
else
doPlayerSendCancel(cid, "Sorry, you don't have enough money.")
end
elseif item.itemid == 1946 then
doPlayerSendCancel(cid, "Sorry, not possible.")
else
doPlayerSendCancel(cid, "You don't have a red skull.")
end
end
local config = {
money = 100000
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureSkullType(cid) == SKULL_RED then
if doPlayerRemoveMoney(cid, config.money) == TRUE then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 25, "Your skull was removed in exchange for " .. config.money .. " gold pieces.")
else
doPlayerSendCancel(cid, "You do not have the " .. config.money .. " gold pieces that is required to perform such action.")
end
else
doPlayerSendCancel(cid, "You do not have a red skull.")
end
if item.itemid == 1945 then
doTransformItem(item.uid, 1946)
elseif item.itemid == 1946 then
doTransformItem(item.uid, 1945)
end
return TRUE
end
Not working :S It doesnt say any error, but i removes money and says "you dont have enough money" and it doesnt remove rs![]()
PHP:local config = { money = 100000 } function onUse(cid, item, fromPosition, itemEx, toPosition) if getCreatureSkullType(cid) == SKULL_RED then if doPlayerRemoveMoney(cid, config.money) == TRUE then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 25, "Your skull was removed in exchange for " .. config.money .. " gold pieces.") else doPlayerSendCancel(cid, "You do not have the " .. config.money .. " gold pieces that is required to perform such action.") end else doPlayerSendCancel(cid, "You do not have a red skull.") end if item.itemid == 1945 then doTransformItem(item.uid, 1946) elseif item.itemid == 1946 then doTransformItem(item.uid, 1945) end return TRUE end
This only removed the skull i think the kills wont removed.o
use doPlayerSetRedSkullTicks(cid, amount)
doPlayerSetRedSkullTicks(cid, 1)
local config = {
money = 100000
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureSkullType(cid) == SKULL_RED then
if doPlayerRemoveMoney(cid, config.money) == TRUE then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSetRedSkullTicks(cid, 1)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid, 25, "Your skull was removed in exchange for " .. config.money .. " gold pieces.")
else
doPlayerSendCancel(cid, "You do not have the " .. config.money .. " gold pieces that is required to perform such action.")
end
else
doPlayerSendCancel(cid, "You do not have a red skull.")
end
return TRUE
end