Hello there OTLanders, I have a challenge for you today! I am trying to convert a talkaction that displays the top 10 fraggers on the server through a talk action. The script will be set on a 15 minute interval to display the highscores.
Hopefully someone can through me a bit of their knowledge in exchange for some rep and credits on the server page.
Current Talk Action Code:
So as said, instead of an onSay, should be onInterval or whatever the word is to run the global event to broadcast.
Again, any help is greatly appreciated!
Hopefully someone can through me a bit of their knowledge in exchange for some rep and credits on the server page.
Current Talk Action Code:
Code:
function onSay(cid, words, param, channel)
local players = playersMaxAtHightscore
local result = db.getResult("SELECT `points`, `name` FROM `players` WHERE `group_id` = "..max_GroupID_on_Highscore.." ORDER BY `points` DESC, `name` ASC;")
if (result:getID() ~= -1) then
str = "# [Frags] - Name -\n"
local i, name = 1, ""
while TRUE do
name = result:getDataString("name")
if isInArray(dont_showing_names_at_highscore, name) == false then
str = str .. "\n " .. i .. ". [" .. result:getDataInt("points") .. "] - " .. result:getDataString("name")
i = i+1
end
if not(result:next()) or i > players then
break
end
end
if str ~= "" then
doPlayerPopupFYI(cid, str)
end
end
result:free()
return TRUE
end
So as said, instead of an onSay, should be onInterval or whatever the word is to run the global event to broadcast.
Again, any help is greatly appreciated!