• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action Event not working

Dumeko

New Member
Joined
Apr 7, 2012
Messages
55
Reaction score
0
[ function onUse(cid, item, fromPosition, itemEx, toPosition)
local reward = config[item.actionid]
if getPlayerItemCount(cid, 9020) >= reward.cost then
Added = doPlayerAddItem(cid,item.actionid,reward.amount)
doChangeTypeItem(Added, reward.amount)
doPlayerRemoveItem(cid,9020,reward.cost)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You bought '..getItemArticleById(item.actionid)..' '..getItemNameById(item.actionid)..' for '..reward.cost..' tokens.')
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you do not have enough tokens.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need "..reward.cost.." tokens for "..getItemArticleById(item.actionid).." "..getItemNameById(item.actionid)..".")
end
return TRUE
end]



when i have enough tokens, and i right click on the item i want to buy, nothing happens, i just get the msg you cannot use this can anyone see any bugs in this script?


sorry its not tagged or quoted properly x.x
 
Back
Top