GetScoreBoard
Jump to navigation
Jump to search
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