I need help to make my buy function,
i have this:
local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
doPlayerRemoveMoney(cid, t[item].buyprice*amount)
doPlayerAddItem(cid, [t]item, amount)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought " .. amount ...