local tab {
[actionid] = {price = 10000, itemid = 1234},
[actionid] = {price = 10000, itemid = 1234},
[actionid] = {price = 10000, itemid = 1234}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (item.actionid == tab[item.actionid]) then
if getPlayerMoney(cid) >= tab[item.actionid][price] then
doPlayerBuyItem(cid, tab[item.actionid][itemid], 1, tab[item.actionid][price], 1)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You bought " .. getItemNameById(tab[item.actionid][itemid]) .. " for " .. tab[item.actionid][price] .. "!")
else
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You dont have a money (" .. tab[item.actionid][price] .. ")!")
end
end
return true
end