Squirrel/Server/Functions/Pickups/VirtualWorld

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
 
Line 37: Line 37:
 
=== Notes ===
 
=== Notes ===
  
The function [[Squirrel/Server/Functions/Pickup/VirtualWorld|Pickup.VirtualWorld]] and call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in corresponding pages.
+
The function [[Squirrel/Server/Functions/Pickups/VirtualWorld|Pickup.VirtualWorld]] and call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in corresponding pages.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Pickups}}
 
{{Squirrel/Server/Functions/Pickups}}

Latest revision as of 19:22, 3 March 2015

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

This function sets or return the VirtualWorld of a pickup.

[edit] Syntax

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

[edit] 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.  

[edit] Notes

The function Pickup.VirtualWorld and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox