Squirrel/Server/Events/Pickup/onPickupPickedUp
From Liberty Unleashed Wiki
(Difference between revisions)
m (:_:) |
|||
Line 1: | Line 1: | ||
− | {{Squirrel/Title| | + | {{Squirrel/Title|onPickupPickedUp}} |
This is called when a player picks up a pick-up. | This is called when a player picks up a pick-up. | ||
Revision as of 16:33, 4 November 2010
This is called when a player picks up a pick-up.
Syntax
function onPickupPickedUp( Player player, Pickup pickup )
Arguments
- player - The player that collected the pick-up
- pickup - The pickup which was collected
Returns
This event does not handle return values.
Example
This example will tell the player which pickup they have just hit.
function onPickupPickedUp( player, pickup ) { MessagePlayer( "You picked up pickup id " + pickup.ID + ", Model: " + pickup.Model, player ); return 1; }
Notes
The functions Pickup.ID, Pickup.Model and MessagePlayer were used in in this example. More info about them can be found in the corresponding pages.
Related Events
- onPickupPickedUp
- onPickupRespawn