Squirrel/Server/Functions/Server/SetMaxPlayers
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ Changes the maximum players limit of the server. == Syntax == <code>bool SetMaxPlayers( int limit )</code> == Arguments == * '''limit''' - The number of players allowed to jo...) |
m (Squirrel/Functions/Server/SetMaxPlayers moved to Squirrel/Server/Functions/Server/SetMaxPlayers: Separating from clientside scripts) |
Revision as of 04:19, 14 November 2009
Changes the maximum players limit of the server.
Syntax
bool SetMaxPlayers( int limit )
Arguments
- limit - The number of players allowed to join you want to set
Example
This example will change the server player limit when a player types '/setlimit 20'
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "setlimit" ) { SetMaxPlayers( text.tointeger() ); } }
Notes
The call OnPlayerCommand was also used in the example. More info about this in the corresponding page.