• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Blance preimiun points in game - tfs client 9.1 (!blance)

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

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
 
"fast" ? and u dont even post your balance.lua? ahaha funny,
I want 1 billion dollars, fast too, okay?

lol did not you see?

again
my balance.lua
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

important detail HELP
 
I need just show balance of the premium_points in game !balance

Code:
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 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
 
Last edited:
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 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
 
Last edited:
Back
Top