Lua function to get the player at the given position on the leaderboard.
◆ Implementation()
| ulong RoomService.GetPlayerAtPosition.Implementation |
( |
int | position | ) |
|
|
inlineprivate |
Usage:
Lua function to get the player at the given position on the leaderboard.
Definition RoomServiceLuaFunctions.cs:720
Definition MyPluginInfo.cs:2
- Parameters
-
| position | The leaderboard position to get. Index starts at 0 (first place) |
- Returns
- The players steamID, or 0 if unavailable.
- Return values
-
Source Code
737 {
738 if (!RoomServiceUtils.IsOnlineHost())
739 {
740 return 0;
741 }
742
743 ulong steamID = 0;
744
745 try
746 {
747 steamID = ZeepkistNetwork.Leaderboard[position].SteamID;
748 }
749 catch
750 {
751 steamID = 0;
752 }
753
754 return steamID;
755 }