- Documentation
- Shared functions
- getMaxPlayers
Function
getMaxPlayers
Returns the number of slots on the server (after a change with setMaxPlayers - the new value).
Syntax
int getMaxPlayers()Returns
Number of slots.
Example
addEventHandler("onPlayerJoin", root, function()
outputChatBox(("Graczy: %d/%d"):format(getPlayerCount(), getMaxPlayers()), source)
end)
Notes
Client. Works in a client script too.