darkmu
Well-Known Member
I am developing a highscore but I would like to know how I make it so that the players return without repeating the same thing.
And I would also like to put the names of the players, you think that making an inner join in a query is very bad, what would be the best way?
TFS 1.3
In this case, he was supposed to introduce only one person, because there is only one person on the server.
And I would also like to put the names of the players, you think that making an inner join in a query is very bad, what would be the best way?
TFS 1.3
Lua:
function onSay(cid, words, param)
local player = Player(cid)
local players = 10
local str = ""
local player_id = 0
str = "# [Respect Points] #"
local resultId = db.storeQuery("SELECT `recruiter` FROM `accounts` WHERE `recruiter` > 0 ORDER BY `recruiter` DESC;")
if resultId then
local i = 1
while TRUE do
if i > players then
break
end
local points = result.getDataInt(resultId, 'recruiter')
str = str .. "\n " .. i .. ". [" .. points .. "] - "
i = i+1
end
result:free()
end
if str ~= "" then
doPlayerPopupFYI(player, str)
end
return TRUE
end
In this case, he was supposed to introduce only one person, because there is only one person on the server.