GetPlayerPoolSize

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 19:27, 28 February 2015


This function was added in SA-MP 0.3.7 RC2 and will not work in earlier versions!


Description:

Gets the highest playerid currently in use on the server.


Parameters:
This function has no parameters.


Return Values:

The highest playerid currently in use on the server.


Example Usage:

FreezeAll()
{
    for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
    {
        TogglePlayerControllable(i, 0);
    }
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

  • GetMaxPlayers: Gets the maximum number of players that can join the server.