Scripting/Squirrel/Events/Pickup/onPickupPickedUp

From VC-MP Wiki

Jump to: navigation, search

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

Syntax

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.

function onPickupPickedUp( player, pickup )
{
     MessagePlayer( "You picked up pickup id " + pickup.ID + ", Model: " + pickup.Model, player );
}

Notes

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

Related Events

Personal tools
squirrel scripting