Squirrel/Server/Events/Player/onPlayerVirtualWorldChange

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|onPlayerVirtualWorldChange}} This is called when a player moves from a virtual world to another. == Syntax == <code>function onPlayerVirtualWorldChange( Player…')
 

Latest revision as of 17:22, 22 December 2010

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

This is called when a player moves from a virtual world to another.

[edit] Syntax

  1. function onPlayerVirtualWorldChange( Player player, int old, int new )

[edit] Arguments

  • player - The pointer of the player
  • old - The world player left
  • new - The new virtual world

[edit] Returns

This event does not handle return values.

[edit] Example

This message will notify player the world they just entered.

  1.  
  2. function onPlayerVirtualWorldChange( player, old, new )
  3. {
  4. MessagePlayer( "You entered virtual world " + new, player );
  5. return 1;
  6. }
  7.  

[edit] Notes

The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.

[edit] Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox