Lua function to get the number of players in the current lobby.
◆ Implementation()
| int RoomService.GetPlayerCount.Implementation |
( |
| ) |
|
|
inlineprivate |
Usage:
Lua function to get the number of players in the current lobby.
Definition RoomServiceLuaFunctions.cs:633
Definition MyPluginInfo.cs:2
- Returns
- The number of players in the current lobby, or -1 if unavailable.
- Return values
-
Source Code
650 {
651 if (!RoomServiceUtils.IsOnlineHost())
652 {
653 return -1;
654 }
655
656 return ZeepkistNetwork.Players?.Count ?? -1;
657 }