Pickup.VirtualWorld

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

This function sets or return the VirtualWorld of a pickup.

Syntax

  1. int Pickup.VirtualWorld
  1. Pickup.VirtualWorld = int world

Example

Get the VirtualWorld of a Pickup

  1.  
  2. function onPlayerCommand ( pPlayer, szCommand, szParams ) {
  3.  
  4. switch ( szCommand ) {
  5.  
  6. case "get": {
  7.  
  8. local Pickup = FindPickup ( 0 );
  9. if ( Pickup ) {
  10. MessagePlayer ( "VirtualWorld: " + Pickup.VirtualWorld, pPlayer );
  11. return;
  12. }
  13.  
  14. MessagePlayer ( "No pickup with id 0 found!", pPlayer );
  15.  
  16. return;
  17. }
  18. }
  19. }
  20.  

Notes

The function Pickup.VirtualWorld 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