se o do carinha não funcionar,
function onUse(cid, item, fromPosition, itemEx, toPosition)
local x = {
item = 7620, -- Item for sell
backpack = 2001, -- Backpack
money = 4000 -- Value
}
local y = {
name = getItemNameById(x.item),
bag = doPlayerAddItem(cid, x.backpack)
}
if doPlayerRemoveMoney(cid, x.money) == true then
doSendAnimatedText(fromPosition, "Purchased", TEXTCOLOR_YELLOW)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have purchased a backpack of "..y.name.."s for "..x.money.." gold.")
for i=1,100 do
doAddContainerItem(y.bag, x.item)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need "..x.money.." gold coins for a backpack of "..y.name.."s.")
end
return false
end