GetScoreBoard
Revision as of 15:12, 30 December 2024 by Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> This function was added in v1.8 beta 5(not released as of 30.Dec.2024) and will not work on previous versions. </poem> {{Welcome|desc=Gets the scoreboard along with ping of players.| params=<source>process_scoreboard</source> ::process_scoreboard : A one parameter function like <source inline>function(data)</source> which will be called when scoreboard table arrives from server. On succes...")
This function was added in v1.8 beta 5(not released as of 30.Dec.2024) and will not work on previous versions.
Description:
Gets the scoreboard along with ping of players.
Parameters:
process_scoreboard
- process_scoreboard : A one parameter function like
function(data)
which will be called when scoreboard table arrives from server. On successful arrival, data will be an array of tables containing keys:ID
,Score
andPing
- process_scoreboard : A one parameter function like
Return Values:
true on success, false if scoreboard was already requested but it's not yet arrived.
Example
GetScoreBoard(function(data){ foreach(val in data)print("ID:"+val.ID+", Score: "+val.Score+", Ping: "+val.Ping+"\n"); }
Output:
ID:0, Score: 200, Ping: 1