• 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!

!balance premium_points cliente 9.1 tfs

marcelao777

New Member
Joined
Sep 9, 2011
Messages
81
Reaction score
0
hi, my script have error in getDataInt help, i need just show balance premium points in game, help please.


my script.lua
Code:
dofile("./config.lua")
if sqlType == "mysql" then
		env = assert(luasql.mysql())
		con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
	else -- sqlite
		env = assert(luasql.sqlite3())
		con = assert(env:connect(sqliteDatabase))
	end


function onSay(cid, words, param, channel) 
	local nome = getPlayerName(cid) 
 	query = assert(con:execute("select `account_id` from `players` where `name`='"..nome.."';")) 
    	local AccID = query:getDataInt("account_id")
	query = assert(con:execute("SELECT `premium_points` FROM `accounts` WHERE `id`='"..AccID.."';"))  
	local saldo = query:getDataInt("premium_points") 
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O Seu saldo no Shopping é de: "..saldo.." moedas!")
   return true   
end

error in my console

baklacer.jpg

SOLVED CAN CLOSED TOPIC
 
Last edited:
Code:
function onSay(cid, words, param, channel)
		if isPlayer(cid) then
            doPlayerSendTextMessage(cid, 19, "|| ".. getPlayerPremiumDays(cid) .." Premium Days. || ".. getAccountPoints(cid) .." Premium Points ||")
         end
         return true
end
 
Code:
function onSay(cid, words, param, channel)
		if isPlayer(cid) then
            doPlayerSendTextMessage(cid, 19, "|| ".. getPlayerPremiumDays(cid) .." Premium Days. || ".. getAccountPoints(cid) .." Premium Points ||")
         end
         return true
end


".. getAccountPoints(cid) .." it's not a tfs function you need to add manually to lib/050-function you can search the function.
 
Back
Top Bottom