Squirrel/Server/Functions/Game/GetIslands

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This function returns the current value for game islands when the server is in Liberty Unleashed mode. Possible values are: * '''0''' - All islands closed * '''1''' - Portland Is...)
 
(Example)
Line 19: Line 19:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
 
 
<code lang="squirrel">
 
<code lang="squirrel">
-- todo
+
function onPlayerCommand( player, command, text )
 +
{
 +
if ( command == "islands" ) MessagePlayer( "Current Island setting: " + GetIslands(), player );
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- Example notes here
+
This function is used to return what islands are currently being used by the server.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Game}}
 
{{Squirrel/Server/Functions/Game}}

Revision as of 02:42, 7 January 2010

This function returns the current value for game 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. int GetIslands()

Arguments

  • none

Example

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "islands" ) MessagePlayer( "Current Island setting: " + GetIslands(), player );
  5. }
  6.  

Notes

This function is used to return what islands are currently being used by the server.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox