Scripting/Squirrel/Functions/Pickups/ID

From VC-MP Wiki

Jump to: navigation, search

This instance variable returns the ID of the pickup.

Syntax

int pickup.ID

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, player );
}

Notes

The function MessagePlayer and call onPickupPickedUp were used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
squirrel scripting