God Mythera
Veteran OT User
So when a player trys to use a item that gives 'coins' to there account, it shows no errors.
Script
When i try to transfer coins
Script
Code:
local function doPlayerAddPremiumPoints(cid, count)
db.query('UPDATE accounts SET coins = coins+'.. count ..' WHERE id = ' .. getAccountNumberByPlayerName(getCreatureName(cid)))
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddPremiumPoints(cid, 25)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have recived 25 coins to your account.")
doSendMagicEffect(getCreaturePosition(cid), 28)
doRemoveItem(item.uid,1)
return true
end
When i try to transfer coins
Last edited: