GetPlayerPoolSize
Description:
Function GetPlayerPoolSize gets the highest playerid currently in use on the server.
Function GetPlayerPoolSize was added in 0.3.7 and will not work in earlier versions! |
Parameters:
(This function has no parameters.)
Return Values:
The highest playerid currently in use on the server or 0 if there are no connected players.
Examples:
FreezeAll() { for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++) // note that we assign the return value to a new variable (j) to avoid calling the function with each iteration { TogglePlayerControllable(i, 0); } }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetVehiclePoolSize: Gets the highest vehicleid currently in use on the server.
- GetMaxPlayers: Gets the maximum number of players that can join the server.