Squirrel/Server/Events/Pickup/onPickupPickedUp

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This is called when a player picks-up a pick-up. == Syntax == <code>function onPickupPickedUp( player, pickup )</code> == Parameters == * '''player''' - The player that colle...)

Revision as of 09:56, 9 January 2010

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

Syntax

  1. function onPickupPickedUp( player, pickup )

Parameters

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


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. }
  6.  

Notes

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

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox