Squirrel/Server/Functions/Server/SetMaxPlayers

From Liberty Unleashed Wiki
Revision as of 04:19, 14 November 2009 by Juppi (Talk | contribs)

Jump to: navigation, search

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