Squirrel/Server/Functions/Players/Island

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|Player.Island}} This ''Player'' class member returns the island ID that the player is currently on. == Syntax == <code>int Player.Island</code> == Arguments =…')
 

Latest revision as of 17:11, 4 October 2010

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

This Player class member returns the island ID that the player is currently on.

[edit] Syntax

  1. int Player.Island

[edit] Arguments

  • none

[edit] Example

This example command returns what island the player is on when they type '/island'.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "island" )
  5. {
  6. MessagePlayer( "Your are on island ID " + pPlayer.Island, pPlayer );
  7. }
  8. return 1;
  9. }
  10.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox