local Config = {
BuyMoney = 1000,
ItemID = 2268
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, Config.BuyMoney) then
doSendAnimatedText(fromPosition, "Purchased", TEXTCOLOR_YELLOW)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have purchased a ".. getItemNameById(Config.ItemID) .."s for ".. Config.BuyMoney .." gold.")
doPlayerAddItem(cid, Config.ItemID, 100)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need ".. Config.BuyMoney .." gold coins to buy a "..getItemNameById(Config.ItemID) .."s.")
end
end