RoomService v2.3.1
Loading...
Searching...
No Matches
RoomService.GetLeaderboard Class Reference

Lua function to retrieve the entire leaderboard.

Member Function Documentation

◆ Implementation()

List< LeaderboardItem > RoomService.GetLeaderboard.Implementation ( )
inlineprivate

Usage:

Lua function to retrieve the entire leaderboard.
Definition RoomServiceLuaFunctions.cs:827
Definition MyPluginInfo.cs:2
Returns
A list of LeaderboardItem representing the leaderboard. If unavailable, returns an empty list.
Return values
LeaderboardThis is an array with the follow structure:
Example array[0] = { SteamID = "76561197993793009", Time = 1337, Username = "Kilandor" }
SteamID The SteamID of the player.
Time Time on Leaderboard
Username Username on Leaderboard

Source Code

847 {
848 if (!RoomServiceUtils.IsOnlineHost())
849 {
850 return new List<LeaderboardItem>();
851 }
852
853 return ZeepkistNetwork.GetLeaderboard() ?? new List<LeaderboardItem>();
854 }