GetMaxPlayers

From SA-MP Wiki

Jump to: navigation, search

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


ReturnsThe maximum number of players.


new s[128];
format(s, sizeof(s), "There are %i slots on this server!", GetMaxPlayers());
SendClientMessage(playerid, 0xFFFFFFFF, s);
Personal tools