GetMaxPlayers: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
This function returns the maximum number of player slots on the server. | This function returns the maximum number of player slots on the server. | ||
Line 6: | Line 5: | ||
<syntaxhighlight lang="lua">int getMaxPlayers ()</syntaxhighlight> | <syntaxhighlight lang="lua">int getMaxPlayers ()</syntaxhighlight> | ||
== | ===Returns=== | ||
Returns the maximum number of players allowed on the server. | |||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">playermax = | This example gets the maximum number of players for the server and outputs it as part of a message in the chat box. | ||
outputChatBox ( "There are currently " | <syntaxhighlight lang="lua">playermax = getMaxPlayers () | ||
outputChatBox ( "There are currently " .. playermax .. " player slots in this server." )</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Server functions}} | {{Server functions}} |
Revision as of 11:03, 14 August 2006
This function returns the maximum number of player slots on the server.
Syntax
int getMaxPlayers ()
Returns
Returns the maximum number of players allowed on the server.
Example
This example gets the maximum number of players for the server and outputs it as part of a message in the chat box.
playermax = getMaxPlayers () outputChatBox ( "There are currently " .. playermax .. " player slots in this server." )
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown