Squirrel/Server/Functions/Game/SetIslands

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|SetIslands}}
 
This function sets the allowed islands when the server is in Liberty Unleashed mode. Possible values are:
 
This function sets the allowed islands when the server is in Liberty Unleashed mode. Possible values are:
 
* '''0''' - All islands closed
 
* '''0''' - All islands closed

Revision as of 10:45, 11 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function sets the allowed islands when the server is in Liberty Unleashed mode. Possible values are:

  • 0 - All islands closed
  • 1 - Portland Island open, Staunton Island and Shoreside Vale closed
  • 2 - Portland Island and Shoreside Vale closed, Staunton Island open
  • 3 - Portland Island and Staunton Island closed, Shoreside Vale open
  • 4 - Portland Island and Staunton Island open, Shoreside Vale closed
  • 5 - Portland Island closed, Staunton Island and Shoreside Vale open
  • 6 - All islands open

Syntax

  1. bool SetIslands( int iIslands )

Arguments

  • iIslands - The value for possible islands (check above)

Example

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "setislands" )
  5. {
  6. if ( ( text.tointeger() < 7 ) && ( text.tointeger() >= 0 ) SetIslands( text.tointeger() )
  7. else MessagePlayer( "Error - Allowed islands must be between 0 and 6", player );
  8. }
  9. }
  10.  
  11.  

Notes

This command is used to set the available islands those who join or are currently in the server.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox