GetMaxPlayers
From SA-MP Wiki
GetMaxPlayers
Returns the maximum number of players that can play on your server. You can not use predefined MAX_PLAYERS instead of this function, as MAX_PLAYERS defaults to 500. GetMaxPlayers is in contrast read from the server.cfg
This function has no parameters
| Returns | The maximum number of players. |
new s[128]; format(s, sizeof(s), "There are %i slots on this server!", GetMaxPlayers()); SendClientMessage(playerid, 0xFFFFFFFF, s);
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- IsPlayerConnected: Check if a player is connected to the server.
