SetMaxPlayers

From Liberty Unleashed Wiki
Revision as of 10:21, 11 October 2010 by VRocker (Talk | contribs)

Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

Changes the maximum players limit of the server.

Syntax

  1. 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'

  1.  
  2. function OnPlayerCommand( id, cmd, text )
  3. {
  4. if ( cmd == "setlimit" )
  5. {
  6. SetMaxPlayers( text.tointeger() );
  7. }
  8. }
  9.  

Notes

The call OnPlayerCommand was also used in the example. More info about this in the corresponding page.

Related Functions

Template:Squirrel/Functions/Server

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox