Scripting/Squirrel/Functions/Vehicles/ID

From VC-MP Wiki

Jump to: navigation, search

This instance variable returns the ID of the vehicle.

Syntax

int vehicle.ID

Example

This example will tell the player which vehicle they are entering.

function onPlayerEnterVehicle( player, vehicle )
{
     MessagePlayer( "You are entering vehicle ID: " + vehicle.ID, player );
}

Notes

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

Related Functions

Personal tools
squirrel scripting