Scripting/Squirrel/Functions/Vehicles/Model

From VC-MP Wiki

Jump to: navigation, search

This instance variable returns the model ID of the vehicle.

Syntax

int vehicle.Model

Example

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

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

Notes

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

Related Functions

Personal tools
squirrel scripting