marcelao777
New Member
- Joined
- Sep 9, 2011
- Messages
- 81
- Reaction score
- 0
Hi
I need see the balance in game of the premium points !balance
my balance.lua no work
help fast please
I need see the balance in game of the premium points !balance
my balance.lua no work
PHP:
function getAccountPoints(cid)
local res = db.getResult('select `accounts`.`premium_points` from accounts where name = \''..getPlayerAccount(cid)..'\'')
if(res:getID() == -1) then
return false
end
local ret = res:getDataInt("premium_points")
res:free()
return tonumber(ret)
end
function doAccountAddPoints(cid, count)
return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) + count .."' WHERE `name` ='"..getPlayerAccount(cid).."'")
end
function doAccountRemovePoints(cid, count)
return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) - count .."' WHERE `name` ='"..getPlayerAccount(cid).."'")
end
function onSay(cid, words, param, channel)
if isPlayer(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your Account has ' .. getAccountPoints(cid) .. ' premium points.")
end
return TRUE
end
help fast please