Squirrel/Server/Events/Pickup/onPickupPickedUp

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (:_:)
m
 
Line 30: Line 30:
 
=== Notes ===
 
=== Notes ===
  
The functions [[Squirrel/Server/Functions/Pickups/ID|Pickup.ID]], [[Squirrel/Server/Functions/Pickups/Model|Pickup.Model]] and [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] were used in in this example. More info about them can be found in the corresponding pages.
+
The functions [[Squirrel/Server/Functions/Pickups/ID|Pickup.ID]], [[Squirrel/Server/Functions/Pickups/Model|Pickup.Model]] and [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] were used in this example. More info about them can be found in the corresponding pages.
  
 
== Related Events ==
 
== Related Events ==
  
 
{{Squirrel/Server/Events/Pickup}}
 
{{Squirrel/Server/Events/Pickup}}

Latest revision as of 16:38, 4 November 2010

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

This is called when a player picks up a pick-up.

[edit] Syntax

  1. function onPickupPickedUp( Player player, Pickup pickup )

[edit] Arguments

  • player - The player that collected the pick-up
  • pickup - The pickup which was collected

[edit] Returns

This event does not handle return values.

[edit] Example

This example will tell the player which pickup they have just hit.

  1.  
  2. function onPickupPickedUp( player, pickup )
  3. {
  4. MessagePlayer( "You picked up pickup id " + pickup.ID + ", Model: " + pickup.Model, player );
  5. return 1;
  6. }
  7.  

[edit] Notes

The functions Pickup.ID, Pickup.Model and MessagePlayer were used in this example. More info about them can be found in the corresponding pages.

[edit] Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox