GetMaxPlayers

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This returns the maximum ammount of players allowed in the server.

Syntax

  1. int GetMaxPlayers()

Arguments

  • None

Example

This example will return the max players when a player types '/maxplayers'.

  1.  
  2. function OnPlayerCommand( id, cmd, text )
  3. {
  4. if ( cmd == "maxplayers" )
  5. {
  6. MessagePlayer( "The maximum ammount of players allowed on this server is " + GetMaxPlayers(), id );
  7. }
  8. }
  9.  

Notes

The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox