setMaxPlayers
Server
Changes how many players the server takes at once.
bool setMaxPlayers(int max)
Parameters
| Name | Type | Description |
|---|---|---|
| max | int | The new limit, from 0 up to the players convar's value. |
Returns
true if the limit changed, false if it is above the players convar the server started with.
Example
addCommandHandler("maintenance", function()
setMaxPlayers(getPlayerCount())
end)NoteThe limit cannot rise above the
players convar read when the server started.