[**SixL client API**](../../../README.md)

***

[SixL client API](../../../README.md) / [game/vehicle](../README.md) / GameVehicleMp

# Interface: GameVehicleMp

The vehicle functions: queries of a vehicle's state, its doors, windows and health, and settings of its behaviour.

## Remarks

A vehicle, ped, trailer or train is given as an entity object or as its handle. A model is given as its name
or as its hash (`mp.joaat` of the name). Getters are asynchronous: they return a Promise. Health values are floats on the
0..1000 scale (1000 undamaged), the same scale their setters take.

## Example

```ts
const engine = await mp.game.vehicle.getEngineHealth(vehicle);
```

## Methods

### addUpsidedownCheck()

> **addUpsidedownCheck**(`vehicle`): `void`

Starts watching whether a vehicle is upside down.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.addUpsidedownCheck(vehicle);
```

***

### attachToTrailer()

> **attachToTrailer**(`vehicle`, `trailer`, `radius`): `void`

Attaches a vehicle to a trailer that is near it.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The towing vehicle, or its handle.

##### trailer

`number` \| \{ `handle`: `number`; \}

The trailer, or its handle.

##### radius

`number`

The distance within which the trailer attaches, in metres.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.attachToTrailer(truck, trailer, 5);
```

***

### bringToHalt()

> **bringToHalt**(`vehicle`, `distance`, `duration`, `unknown`): `void`

Brings a vehicle to a halt over a distance and a time.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### distance

`number`

The distance over which the vehicle stops, in metres.

##### duration

`number`

The time in milliseconds the stop takes.

##### unknown

`boolean`

A flag of the game, a bool.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.bringToHalt(vehicle, 10, 2000, false);
```

***

### deleteAllTrains()

> **deleteAllTrains**(): `void`

Deletes all the trains of the world.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.deleteAllTrains();
```

***

### detachFromTrailer()

> **detachFromTrailer**(`vehicle`): `void`

Detaches a vehicle from its trailer.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.detachFromTrailer(vehicle);
```

***

### doesHaveRoof()

> **doesHaveRoof**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle has a roof.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A promise of true when it has.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.doesHaveRoof(vehicle);
```

***

### doesHaveStuckVehicleCheck()

> **doesHaveStuckVehicleCheck**(`vehicle`): `Promise`\<`boolean`\>

Whether the game watches a vehicle for being stuck.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A promise of true when it does.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.doesHaveStuckVehicleCheck(vehicle);
```

***

### fixWindow()

> **fixWindow**(`vehicle`, `index`): `void`

Repairs a window of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### index

`number`

The window, as the game numbers it.

#### Returns

`void`

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.fixWindow(vehicle, 0);
```

***

### getAcceleration()

> **getAcceleration**(`vehicle`): `Promise`\<`number`\>

The acceleration of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the acceleration as a float.

#### Example

```ts
const acceleration = await mp.game.vehicle.getAcceleration(vehicle);
```

***

### getAttachedToCargobob()

> **getAttachedToCargobob**(`cargobob`): `Promise`\<`number`\>

The vehicle a cargobob carries.

#### Parameters

##### cargobob

`number` \| \{ `handle`: `number`; \}

The cargobob, or its handle.

#### Returns

`Promise`\<`number`\>

A promise of the carried vehicle's handle; 0 when it carries none this client has.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const load = await mp.game.vehicle.getAttachedToCargobob(heli);
```

***

### getBodyHealth()

> **getBodyHealth**(`vehicle`): `Promise`\<`number`\>

The body health of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the body health as a float on the 0..1000 scale (1000 is undamaged, 0 is destroyed).

#### Example

```ts
const health = await mp.game.vehicle.getBodyHealth(vehicle);
```

***

### getClassFromName()

> **getClassFromName**(`modelHash`): `Promise`\<`number`\>

The vehicle class of a model, as the game numbers the classes.

#### Parameters

##### modelHash

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`number`\>

A Promise of the class as an integer.

#### Example

```ts
const vehicleClass = await mp.game.vehicle.getClassFromName(mp.joaat('<model name>'));
```

***

### getColours()

> **getColours**(`vehicle`): `Promise`\<\{ `colorPrimary`: `number`; `colorSecondary`: `number`; \}\>

A vehicle's two colours.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<\{ `colorPrimary`: `number`; `colorSecondary`: `number`; \}\>

A promise of the primary and secondary colour.

#### Remarks

Partial: not yet confirmed in the game. The colours are VI's indexes.

#### Example

```ts
const { colorPrimary } = await mp.game.vehicle.getColours(vehicle);
```

***

### getDoorAngleRatio()

> **getDoorAngleRatio**(`vehicle`, `door`): `Promise`\<`number`\>

How far a door of a vehicle is open.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### door

`number`

The door, as the game numbers it.

#### Returns

`Promise`\<`number`\>

A promise of the ratio, 0 (shut) to 1 (open).

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.getDoorAngleRatio(vehicle, 0);
```

***

### getDoorLockStatus()

> **getDoorLockStatus**(`vehicle`): `Promise`\<`number`\>

The door lock status of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the lock status as an integer, the game's own values.

#### Example

```ts
const status = await mp.game.vehicle.getDoorLockStatus(vehicle);
```

***

### getDoorsLockedForPlayer()

> **getDoorsLockedForPlayer**(`vehicle`, `player`): `Promise`\<`boolean`\>

Whether a vehicle's doors are locked for a player.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### player

`number` \| \{ `handle`: `number`; \}

The player, or its handle.

#### Returns

`Promise`\<`boolean`\>

A promise of true when they are.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
if (await mp.game.vehicle.getDoorsLockedForPlayer(vehicle, mp.players.local)) { }
```

***

### getEngineHealth()

> **getEngineHealth**(`vehicle`): `Promise`\<`number`\>

The engine health of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the engine health as a float on the 0..1000 scale (1000 is undamaged, 0 is destroyed).

#### Example

```ts
const health = await mp.game.vehicle.getEngineHealth(vehicle);
```

***

### getEntityAttachedToTowTruck()

> **getEntityAttachedToTowTruck**(`towTruck`): `Promise`\<`number`\>

The entity on a tow truck's hook.

#### Parameters

##### towTruck

`number` \| \{ `handle`: `number`; \}

The tow truck, or its handle.

#### Returns

`Promise`\<`number`\>

A promise of the towed entity's handle; 0 when it tows none this client has.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const towed = await mp.game.vehicle.getEntityAttachedToTowTruck(truck);
```

***

### getEnveffScale()

> **getEnveffScale**(`vehicle`): `Promise`\<`number`\>

The environment effect scale of a vehicle (how much the surroundings affect its look).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the scale as a float.

#### Example

```ts
const scale = await mp.game.vehicle.getEnveffScale(vehicle);
```

***

### getEstimatedMaxSpeed()

> **getEstimatedMaxSpeed**(`vehicle`): `Promise`\<`number`\>

The estimated top speed of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the top speed as a float, in metres per second.

#### Example

```ts
const top = await mp.game.vehicle.getEstimatedMaxSpeed(vehicle);
```

***

### getLandingGearState()

> **getLandingGearState**(`vehicle`): `Promise`\<`number`\>

The state of a vehicle's landing gear (for aircraft).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the state as an integer, the game's own values.

#### Example

```ts
const state = await mp.game.vehicle.getLandingGearState(plane);
```

***

### getLastPedInSeat()

> **getLastPedInSeat**(`vehicle`, `seatIndex`): `Promise`\<`number`\>

The ped that last sat in a seat of the vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### seatIndex

`number`

The seat, numbered as the game numbers them.

#### Returns

`Promise`\<`number`\>

A promise of the ped's handle; 0 when there was none or it is none this client has.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const last = await mp.game.vehicle.getLastPedInSeat(vehicle, -1);
```

***

### getLayoutHash()

> **getLayoutHash**(`vehicle`): `Promise`\<`number`\>

The layout hash of a vehicle (the arrangement of its seats and parts).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the layout hash as an unsigned integer.

#### Example

```ts
const layout = await mp.game.vehicle.getLayoutHash(vehicle);
```

***

### getLiveryCount()

> **getLiveryCount**(`vehicle`): `Promise`\<`number`\>

How many liveries a vehicle has.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A promise of the count.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.getLiveryCount(vehicle);
```

***

### getMaxBraking()

> **getMaxBraking**(`vehicle`): `Promise`\<`number`\>

A vehicle's braking force.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A promise of the force, in the game's scale.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.getMaxBraking(vehicle);
```

***

### getMaxNumberOfPassengers()

> **getMaxNumberOfPassengers**(`vehicle`): `Promise`\<`number`\>

The number of seats of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the number of seats as an integer.

#### Example

```ts
const seats = await mp.game.vehicle.getMaxNumberOfPassengers(vehicle);
```

***

### getModelNumberOfSeats()

> **getModelNumberOfSeats**(`model`): `Promise`\<`number`\>

The same as `getVehicleModelMaxNumberOfPassengers`.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`number`\>

A Promise of the number of seats as an integer.

#### Example

```ts
const seats = await mp.game.vehicle.getModelNumberOfSeats(mp.joaat('<model name>'));
```

***

### getModVariation()

> **getModVariation**(`vehicle`, `modType`): `Promise`\<`boolean`\>

Whether a mod of a vehicle has its variation.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### modType

`number`

The mod slot, as the game numbers it.

#### Returns

`Promise`\<`boolean`\>

A promise of true when it has.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.getModVariation(vehicle, 0);
```

***

### getNumberOfColours()

> **getNumberOfColours**(`vehicle`): `Promise`\<`number`\>

How many colours a vehicle can be painted in.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A promise of the count.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const n = await mp.game.vehicle.getNumberOfColours(vehicle);
```

***

### getNumberOfDoors()

> **getNumberOfDoors**(`vehicle`): `Promise`\<`number`\>

How many doors a vehicle has.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A promise of the count.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const n = await mp.game.vehicle.getNumberOfDoors(vehicle);
```

***

### getNumberOfPassengers()

> **getNumberOfPassengers**(`vehicle`): `Promise`\<`number`\>

The number of passengers in a vehicle, the driver included.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the number of occupied seats as an integer.

#### Example

```ts
const count = await mp.game.vehicle.getNumberOfPassengers(vehicle);
```

***

### getPedInSeat()

> **getPedInSeat**(`vehicle`, `seatIndex`, `p2?`): `Promise`\<`number`\>

The ped in a seat of the vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### seatIndex

`number`

The seat, numbered as the game numbers them.

##### p2?

`boolean`

Not used.

#### Returns

`Promise`\<`number`\>

A promise of the ped's handle; 0 when the seat is empty or the ped is none this client has (a ped of the game's own).

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const driver = await mp.game.vehicle.getPedInSeat(vehicle, -1);
```

***

### getPetrolTankHealth()

> **getPetrolTankHealth**(`vehicle`): `Promise`\<`number`\>

The petrol tank health of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the petrol tank health as a float on the 0..1000 scale (1000 is undamaged, 0 is destroyed).

#### Example

```ts
const health = await mp.game.vehicle.getPetrolTankHealth(vehicle);
```

***

### getPlateType()

> **getPlateType**(`vehicle`): `Promise`\<`number`\>

The plate type of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A Promise of the plate type as an unsigned integer, the game's own values.

#### Example

```ts
const plate = await mp.game.vehicle.getPlateType(vehicle);
```

***

### getTrailerVehicle()

> **getTrailerVehicle**(`vehicle`): `Promise`\<`number`\>

The trailer a vehicle tows.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`number`\>

A promise of the trailer's handle; 0 without a trailer or when it is none this client has.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const trailer = await mp.game.vehicle.getTrailerVehicle(truck);
```

***

### getTrainCarriage()

> **getTrainCarriage**(`train`, `trailerNumber`): `Promise`\<`number`\>

A carriage of a train.

#### Parameters

##### train

`number` \| \{ `handle`: `number`; \}

The train, or its handle.

##### trailerNumber

`number`

Which carriage.

#### Returns

`Promise`\<`number`\>

A promise of the carriage's handle; 0 when there is none this client has.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const first = await mp.game.vehicle.getTrainCarriage(train, 1);
```

***

### getTyresCanBurst()

> **getTyresCanBurst**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle's tyres can burst.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the tyres can burst.

#### Example

```ts
const canBurst = await mp.game.vehicle.getTyresCanBurst(vehicle);
```

***

### getVehicleClassFromName()

> **getVehicleClassFromName**(`modelHash`): `Promise`\<`number`\>

The same as [GameVehicleMp.getClassFromName](#getclassfromname).

#### Parameters

##### modelHash

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`number`\>

A Promise of the class as an integer.

#### Example

```ts
const vehicleClass = await mp.game.vehicle.getVehicleClassFromName(mp.joaat('<model name>'));
```

***

### getVehicleModelMaxNumberOfPassengers()

> **getVehicleModelMaxNumberOfPassengers**(`model`): `Promise`\<`number`\>

The number of seats of a vehicle model.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`number`\>

A Promise of the number of seats as an integer.

#### Example

```ts
const seats = await mp.game.vehicle.getVehicleModelMaxNumberOfPassengers(mp.joaat('<model name>'));
```

***

### isAConvertible()

> **isAConvertible**(`vehicle`, `checkRoofExtras`): `Promise`\<`boolean`\>

Whether a vehicle is a convertible.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### checkRoofExtras

`boolean`

true to count the roof's extras in the check.

#### Returns

`Promise`\<`boolean`\>

A Promise of true for a convertible.

#### Example

```ts
const convertible = await mp.game.vehicle.isAConvertible(vehicle, false);
```

***

### isAlarmActivated()

> **isAlarmActivated**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle's alarm is on.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true while the alarm is on.

#### Example

```ts
const alarm = await mp.game.vehicle.isAlarmActivated(vehicle);
```

***

### isAttachedToTowTruck()

> **isAttachedToTowTruck**(`towTruck`, `vehicle`): `Promise`\<`boolean`\>

Whether a vehicle is attached to a tow truck.

#### Parameters

##### towTruck

`number` \| \{ `handle`: `number`; \}

The tow truck, or its handle.

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A promise of true when it is.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
if (await mp.game.vehicle.isAttachedToTowTruck(towTruck, car)) { }
```

***

### isAttachedToTrailer()

> **isAttachedToTrailer**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle pulls a trailer.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A promise of true when it does.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.isAttachedToTrailer(vehicle);
```

***

### isDoorDamaged()

> **isDoorDamaged**(`veh`, `doorID`): `Promise`\<`boolean`\>

Whether a door of a vehicle is damaged.

#### Parameters

##### veh

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorID

`number`

The door, as the game numbers it.

#### Returns

`Promise`\<`boolean`\>

A promise of true when it is.

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
const v = await mp.game.vehicle.isDoorDamaged(veh, 0);
```

***

### isDoorFullyOpen()

> **isDoorFullyOpen**(`vehicle`, `doorIndex`): `Promise`\<`boolean`\>

Whether a vehicle door is fully open.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorIndex

`number`

The door, as an integer.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the door is fully open.

#### Example

```ts
const open = await mp.game.vehicle.isDoorFullyOpen(vehicle, 0);
```

***

### isDriveable()

> **isDriveable**(`vehicle`, `isOnFireCheck`): `Promise`\<`boolean`\>

Whether a vehicle is driveable (it is not destroyed).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### isOnFireCheck

`boolean`

true to count a vehicle on fire as not driveable.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the vehicle is driveable.

#### Example

```ts
const driveable = await mp.game.vehicle.isDriveable(vehicle, true);
```

***

### isEntityAttachedToHandlerFrame()

> **isEntityAttachedToHandlerFrame**(`vehicle`, `entity`): `Promise`\<`boolean`\>

Whether an entity is attached to a vehicle's handler frame (the frame a crane or a loader holds).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### entity

`number` \| \{ `handle`: `number`; \}

The entity, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the entity is attached.

#### Example

```ts
const attached = await mp.game.vehicle.isEntityAttachedToHandlerFrame(vehicle, object);
```

***

### isExtraTurnedOn()

> **isExtraTurnedOn**(`vehicle`, `extraId`): `Promise`\<`boolean`\>

Whether an extra part of a vehicle is turned on.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### extraId

`number`

The extra's id, as an integer.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the extra is on.

#### Example

```ts
const on = await mp.game.vehicle.isExtraTurnedOn(vehicle, 1);
```

***

### isHeliPartBroken()

> **isHeliPartBroken**(`vehicle`, `checkMainRotor`, `checkRearRotor`, `checkTailBoom`): `Promise`\<`boolean`\>

Whether a part of a helicopter is broken.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The helicopter, or its handle.

##### checkMainRotor

`boolean`

true to check the main rotor.

##### checkRearRotor

`boolean`

true to check the rear rotor.

##### checkTailBoom

`boolean`

true to check the tail boom.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when one of the checked parts is broken.

#### Example

```ts
const broken = await mp.game.vehicle.isHeliPartBroken(heli, true, true, true);
```

***

### isInBurnout()

> **isInBurnout**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle is doing a burnout (spinning its wheels in place).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true while the vehicle does a burnout.

#### Example

```ts
const burnout = await mp.game.vehicle.isInBurnout(vehicle);
```

***

### isModel()

> **isModel**(`vehicle`, `model`): `Promise`\<`boolean`\>

Whether a vehicle is of a model.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the vehicle has the model.

#### Example

```ts
const isModel = await mp.game.vehicle.isModel(vehicle, mp.joaat('<model name>'));
```

***

### isOnAllWheels()

> **isOnAllWheels**(`vehicle`): `Promise`\<`boolean`\>

Whether all wheels of a vehicle touch the ground.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when all wheels are on the ground.

#### Example

```ts
const grounded = await mp.game.vehicle.isOnAllWheels(vehicle);
```

***

### isSeatFree()

> **isSeatFree**(`vehicle`, `seatIndex`, `isTaskRunning?`): `Promise`\<`boolean`\>

Whether a seat of a vehicle is free.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### seatIndex

`number`

The seat, as an integer (-1 for the driver).

##### isTaskRunning?

`boolean`

Not used by SixL: accepted for compatibility.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the seat is free.

#### Example

```ts
const free = await mp.game.vehicle.isSeatFree(vehicle, 0);
```

***

### isSirenAudioOn()

> **isSirenAudioOn**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle's siren makes sound.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true while the siren sounds.

#### Example

```ts
const sound = await mp.game.vehicle.isSirenAudioOn(vehicle);
```

***

### isSirenOn()

> **isSirenOn**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle's siren is on.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true while the siren is on.

#### Example

```ts
const siren = await mp.game.vehicle.isSirenOn(vehicle);
```

***

### isSprayable()

> **isSprayable**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle can be sprayed (its paint can be changed).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the vehicle can be sprayed.

#### Example

```ts
const sprayable = await mp.game.vehicle.isSprayable(vehicle);
```

***

### isStolen()

> **isStolen**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle is marked as stolen.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the vehicle is stolen.

#### Example

```ts
const stolen = await mp.game.vehicle.isStolen(vehicle);
```

***

### isStopped()

> **isStopped**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle is stopped (it does not move).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the vehicle is stopped.

#### Example

```ts
const stopped = await mp.game.vehicle.isStopped(vehicle);
```

***

### isStoppedAtTrafficLights()

> **isStoppedAtTrafficLights**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle is stopped at traffic lights.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true while the vehicle waits at traffic lights.

#### Example

```ts
const waiting = await mp.game.vehicle.isStoppedAtTrafficLights(vehicle);
```

***

### isStuckOnRoof()

> **isStuckOnRoof**(`vehicle`): `Promise`\<`boolean`\>

Whether a vehicle is stuck on its roof.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the vehicle is upside down and stuck.

#### Example

```ts
const stuck = await mp.game.vehicle.isStuckOnRoof(vehicle);
```

***

### isStuckTimerUp()

> **isStuckTimerUp**(`vehicle`, `stuckType`, `requiredTime`): `Promise`\<`boolean`\>

Whether the stuck timer of a vehicle has run out (it has been stuck for the given time).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### stuckType

`number`

The kind of stuck, as an integer.

##### requiredTime

`number`

The time in milliseconds the vehicle must have been stuck.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the timer has run out.

#### Example

```ts
const stuck = await mp.game.vehicle.isStuckTimerUp(vehicle, 0, 5000);
```

***

### isThisModelABicycle()

> **isThisModelABicycle**(`model`): `Promise`\<`boolean`\>

Whether a model is a bicycle.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`boolean`\>

A Promise of `true` for a bicycle model.

#### Example

```ts
const bicycle = await mp.game.vehicle.isThisModelABicycle(mp.joaat('<model name>'));
```

***

### isThisModelABike()

> **isThisModelABike**(`model`): `Promise`\<`boolean`\>

Whether a model is a bike (a motorcycle).

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`boolean`\>

A Promise of `true` for a bike model.

#### Example

```ts
const bike = await mp.game.vehicle.isThisModelABike(mp.joaat('<model name>'));
```

***

### isThisModelABoat()

> **isThisModelABoat**(`model`): `Promise`\<`boolean`\>

Whether a model is a boat.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`boolean`\>

A Promise of true for a boat model.

#### Example

```ts
const boat = await mp.game.vehicle.isThisModelABoat(mp.joaat('<model name>'));
```

***

### isThisModelAHeli()

> **isThisModelAHeli**(`model`): `Promise`\<`boolean`\>

Whether a model is a helicopter.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`boolean`\>

A Promise of `true` for a helicopter model.

#### Example

```ts
const heli = await mp.game.vehicle.isThisModelAHeli(mp.joaat('<model name>'));
```

***

### isThisModelAPlane()

> **isThisModelAPlane**(`model`): `Promise`\<`boolean`\>

Whether a model is a plane.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`boolean`\>

A Promise of `true` for a plane model.

#### Example

```ts
const plane = await mp.game.vehicle.isThisModelAPlane(mp.joaat('<model name>'));
```

***

### isThisModelATrain()

> **isThisModelATrain**(`model`): `Promise`\<`boolean`\>

Whether a model is a train.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

#### Returns

`Promise`\<`boolean`\>

A Promise of true for a train model.

#### Example

```ts
const train = await mp.game.vehicle.isThisModelATrain(mp.joaat('<model name>'));
```

***

### isTyreBurst()

> **isTyreBurst**(`vehicle`, `wheelID`, `completely`): `Promise`\<`boolean`\>

Whether a tyre of a vehicle is burst.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### wheelID

`number`

The wheel, as an integer.

##### completely

`boolean`

true to count only a completely burst tyre.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the tyre is burst.

#### Example

```ts
const burst = await mp.game.vehicle.isTyreBurst(vehicle, 0, false);
```

***

### isWindowIntact()

> **isWindowIntact**(`vehicle`, `windowIndex`): `Promise`\<`boolean`\>

Whether a vehicle window is intact (not broken).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### windowIndex

`number`

The window, as an integer.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the window is intact.

#### Example

```ts
const intact = await mp.game.vehicle.isWindowIntact(vehicle, 0);
```

***

### lowerConvertibleRoof()

> **lowerConvertibleRoof**(`vehicle`, `instantlyLower`): `void`

Lowers a vehicle's convertible roof.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### instantlyLower

`boolean`

`true` to lower it at once.

#### Returns

`void`

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.lowerConvertibleRoof(vehicle, false);
```

***

### modifyTopSpeed()

> **modifyTopSpeed**(`vehicle`, `value`): `void`

Changes the top speed of a vehicle by a value.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### value

`number`

The change, as a float, the game's own scale.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.modifyTopSpeed(vehicle, 10);
```

***

### removeAsset()

> **removeAsset**(`vehicleAsset`): `void`

The same as `removeVehicleAsset`.

#### Parameters

##### vehicleAsset

`number`

The asset's integer id.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.removeAsset(0);
```

***

### removeCombatAvoidanceArea()

> **removeCombatAvoidanceArea**(`index`): `void`

Removes a combat avoidance area of vehicles.

#### Parameters

##### index

`number`

The area's index, as an integer.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.removeCombatAvoidanceArea(0);
```

***

### removeVehicleAsset()

> **removeVehicleAsset**(`vehicleAsset`): `void`

Removes the assets of a vehicle loaded by `requestVehicleAsset`.

#### Parameters

##### vehicleAsset

`number`

The asset's integer id.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.removeVehicleAsset(0);
```

***

### removeWindow()

> **removeWindow**(`vehicle`, `windowIndex`): `void`

Removes a window of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### windowIndex

`number`

The window, as an integer.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.removeWindow(vehicle, 0);
```

***

### requestAsset()

> **requestAsset**(`vehicleHash`, `vehicleAsset`): `void`

The same as `requestVehicleAsset`.

#### Parameters

##### vehicleHash

`string` \| `number`

The model: its name, or its hash.

##### vehicleAsset

`number`

The asset: an integer id of the asset of the model.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.requestAsset(mp.joaat('<model name>'), 0);
```

***

### requestHighDetailModel()

> **requestHighDetailModel**(`vehicle`): `void`

Requests the high-detail model of a vehicle to be loaded.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.requestHighDetailModel(vehicle);
```

***

### requestVehicleAsset()

> **requestVehicleAsset**(`vehicleHash`, `vehicleAsset`): `void`

Requests the assets of a vehicle model to be loaded.

#### Parameters

##### vehicleHash

`string` \| `number`

The model: its name, or its hash.

##### vehicleAsset

`number`

The asset: an integer id of the asset of the model.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.requestVehicleAsset(mp.joaat('<model name>'), 0);
```

***

### resetStuckTimer()

> **resetStuckTimer**(`vehicle`, `nullAttributes`): `void`

Resets the stuck timer of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### nullAttributes

`number` \| `boolean`

A flag of the game, true to clear the attributes too.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.resetStuckTimer(vehicle, true);
```

***

### resetWheels()

> **resetWheels**(`vehicle`, `toggle`): `void`

Resets the wheels of a vehicle to their default positions.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

A flag of the game.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.resetWheels(vehicle, true);
```

***

### rollDownWindow()

> **rollDownWindow**(`vehicle`, `windowIndex`): `void`

Rolls down one window of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### windowIndex

`number`

The window, as an integer.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.rollDownWindow(vehicle, 0);
```

***

### rollDownWindows()

> **rollDownWindows**(`vehicle`): `void`

Rolls down all the windows of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.rollDownWindows(vehicle);
```

***

### rollUpWindow()

> **rollUpWindow**(`vehicle`, `windowIndex`): `void`

Rolls up one window of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### windowIndex

`number`

The window, as an integer.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.rollUpWindow(vehicle, 0);
```

***

### setActiveDuringPlayback()

> **setActiveDuringPlayback**(`vehicle`, `forceActive`): `void`

Sets whether a vehicle stays active during the playback of a recording.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### forceActive

`boolean`

true to keep the vehicle active during the playback.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setActiveDuringPlayback(vehicle, true);
```

***

### setActiveForPedNavigation()

> **setActiveForPedNavigation**(`vehicle`, `toggle`): `void`

Sets whether peds navigating the world may use a vehicle node (a route).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`number` \| `boolean`

The setting as an integer of the game's own values.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setActiveForPedNavigation(vehicle, 1);
```

***

### setAlarm()

> **setAlarm**(`vehicle`, `state`): `void`

Turns a vehicle's alarm on or off.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### state

`boolean`

true to turn the alarm on, false to turn it off.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setAlarm(vehicle, true);
```

***

### setAllVehicleGeneratorsActive()

> **setAllVehicleGeneratorsActive**(): `void`

Makes all vehicle generators active again (the traffic spawns everywhere).

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setAllVehicleGeneratorsActive();
```

***

### setAllVehicleGeneratorsActiveInArea()

> **setAllVehicleGeneratorsActiveInArea**(`x1`, `y1`, `z1`, `x2`, `y2`, `z2`, `p6`, `p7`): `void`

Sets whether vehicle generators are active inside a box (generators spawn traffic).

#### Parameters

##### x1

`number`

The first corner's X coordinate, in metres.

##### y1

`number`

The first corner's Y coordinate, in metres.

##### z1

`number`

The first corner's Z coordinate, in metres.

##### x2

`number`

The opposite corner's X coordinate, in metres.

##### y2

`number`

The opposite corner's Y coordinate, in metres.

##### z2

`number`

The opposite corner's Z coordinate, in metres.

##### p6

`boolean`

A flag of the game, a bool.

##### p7

`boolean`

A flag of the game, a bool.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setAllVehicleGeneratorsActiveInArea(-100, -100, 0, 100, 100, 100, false, false);
```

***

### setAutomaticallyAttaches()

> **setAutomaticallyAttaches**(`vehicle`, `autoAttach`, `scanWithNonPlayerDriver`): `void`

Sets whether a vehicle attaches automatically to a trailer or a tow truck.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### autoAttach

`boolean`

true to attach automatically.

##### scanWithNonPlayerDriver

`boolean`

true to scan for attachments with a non-player driver.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setAutomaticallyAttaches(truck, true, false);
```

***

### setBoatAnchor()

> **setBoatAnchor**(`vehicle`, `toggle`): `void`

Lowers or raises a boat's anchor.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The boat, or its handle.

##### toggle

`boolean`

true to drop the anchor, false to raise it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setBoatAnchor(boat, true);
```

***

### setBoatDisableAvoidance()

> **setBoatDisableAvoidance**(`vehicle`, `p1`): `void`

Turns a boat's collision avoidance off or on.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The boat, or its handle.

##### p1

`boolean`

A flag of the game, a bool.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setBoatDisableAvoidance(boat, true);
```

***

### setBoatSinksWhenWrecked()

> **setBoatSinksWhenWrecked**(`vehicle`, `toggle`): `void`

Sets whether a boat sinks when it is wrecked.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The boat, or its handle.

##### toggle

`boolean`

true to sink the boat when wrecked, false to keep it afloat.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setBoatSinksWhenWrecked(boat, true);
```

***

### setBodyHealth()

> **setBodyHealth**(`vehicle`, `value`): `void`

Sets the body health of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### value

`number`

The body health on the 0..1000 scale (1000 is undamaged).

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setBodyHealth(vehicle, 1000);
```

***

### setBurnout()

> **setBurnout**(`vehicle`, `toggle`): `void`

Makes a vehicle do a burnout (spin its wheels in place).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to start the burnout, false to stop it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setBurnout(vehicle, true);
```

***

### setCanBeTargetted()

> **setCanBeTargetted**(`vehicle`, `state`): `void`

Sets whether a vehicle can be targeted by weapons.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### state

`boolean`

true to make the vehicle targettable, false to make it not.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setCanBeTargetted(vehicle, false);
```

***

### setCanBeUsedByFleeingPeds()

> **setCanBeUsedByFleeingPeds**(`vehicle`, `toggle`): `void`

Sets whether fleeing peds may use a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to let fleeing peds use the vehicle, false to forbid it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setCanBeUsedByFleeingPeds(vehicle, false);
```

***

### setCanBeVisiblyDamaged()

> **setCanBeVisiblyDamaged**(`vehicle`, `state`): `void`

Sets whether a vehicle can show visible damage.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### state

`boolean`

true to allow visible damage, false to forbid it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setCanBeVisiblyDamaged(vehicle, false);
```

***

### setCanBreak()

> **setCanBreak**(`vehicle`, `toggle`): `void`

Sets whether a vehicle can break apart (its parts can come off).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to allow breaking, false to forbid it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setCanBreak(vehicle, false);
```

***

### setCheatPowerIncrease()

> **setCheatPowerIncrease**(`vehicle`, `value`): `void`

Sets the power increase of a vehicle (a multiplier of its engine power).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### value

`number`

The increase as a float, the game's own scale.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setCheatPowerIncrease(vehicle, 2.0);
```

***

### setDensityMultiplierThisFrame()

> **setDensityMultiplierThisFrame**(`multiplier`): `void`

The same as `setVehicleDensityMultiplierThisFrame`.

#### Parameters

##### multiplier

`number`

The multiplier as a float; 1.0 is normal.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDensityMultiplierThisFrame(0.5);
```

***

### setDirtLevel()

> **setDirtLevel**(`vehicle`, `dirtLevel`): `void`

Sets the dirt level of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### dirtLevel

`number`

The dirt level as a float, the game's own scale.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDirtLevel(vehicle, 5.0);
```

***

### setDisableRandomTrainsThisFrame()

> **setDisableRandomTrainsThisFrame**(`toggle`): `void`

Disables or enables the random trains of the world for this frame.

#### Parameters

##### toggle

`boolean`

true to disable random trains, false to allow them.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDisableRandomTrainsThisFrame(true);
```

***

### setDoorBroken()

> **setDoorBroken**(`vehicle`, `doorIndex`, `deleteDoor`): `void`

Breaks a vehicle door off.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorIndex

`number`

The door, as an integer.

##### deleteDoor

`boolean`

true to delete the door, false to leave it on the ground.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorBroken(vehicle, 0, false);
```

***

### setDoorControl()

> **setDoorControl**(`vehicle`, `doorIndex`, `speed`, `angle`): `void`

Sets the control of a vehicle door: its speed and angle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorIndex

`number`

The door, as an integer.

##### speed

`number`

The door's speed as an integer.

##### angle

`number`

The door's angle as a float, in the game's units.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorControl(vehicle, 0, 1, 0.5);
```

***

### setDoorLatched()

> **setDoorLatched**(`vehicle`, `doorIndex`, `p2`, `p3`, `p4`): `void`

Latches or unlatches a vehicle door.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorIndex

`number`

The door, as an integer.

##### p2

`boolean`

A flag of the game, a bool.

##### p3

`boolean`

A flag of the game, a bool.

##### p4

`boolean`

A flag of the game, a bool.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorLatched(vehicle, 0, false, false, false);
```

***

### setDoorOpen()

> **setDoorOpen**(`vehicle`, `doorIndex`, `loose`, `openInstantly`): `void`

Opens or closes a vehicle door.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorIndex

`number`

The door, as an integer.

##### loose

`boolean`

true to let the door swing loose.

##### openInstantly

`boolean`

true to open the door at once, false to open it with the animation.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorOpen(vehicle, 0, false, false);
```

***

### setDoorShut()

> **setDoorShut**(`vehicle`, `doorIndex`, `closeInstantly`): `void`

Closes one door of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorIndex

`number`

The door, as an integer.

##### closeInstantly

`boolean`

true to close the door at once, false to close it with the animation.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorShut(vehicle, 0, true);
```

***

### setDoorsLocked()

> **setDoorsLocked**(`vehicle`, `doorLockStatus`): `void`

Locks or unlocks all the doors of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorLockStatus

`number`

The lock status, as an integer of the game's own values.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorsLocked(vehicle, 2);
```

***

### setDoorsLockedForAllPlayers()

> **setDoorsLockedForAllPlayers**(`vehicle`, `toggle`): `void`

Locks or unlocks the doors of a vehicle for all players.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to lock the doors for all players, false to unlock them.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorsLockedForAllPlayers(vehicle, true);
```

***

### setDoorsShut()

> **setDoorsShut**(`vehicle`, `closeInstantly`): `void`

Closes all the doors of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### closeInstantly

`boolean`

true to close the doors at once, false to close them with the animation.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setDoorsShut(vehicle, true);
```

***

### setEngineCanDegrade()

> **setEngineCanDegrade**(`vehicle`, `toggle`): `void`

Sets whether a vehicle's engine can degrade (lose health over time).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to let the engine degrade, false to keep it at its health.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setEngineCanDegrade(vehicle, false);
```

***

### setEngineHealth()

> **setEngineHealth**(`vehicle`, `health`): `void`

Sets the engine health of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### health

`number`

The engine health on the 0..1000 scale (1000 is undamaged).

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setEngineHealth(vehicle, 1000);
```

***

### setEngineOn()

> **setEngineOn**(`vehicle`, `value`, `instantly`, `disableAutoStart`): `void`

Turns a vehicle's engine on or off.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### value

`boolean`

true to turn the engine on, false to turn it off.

##### instantly

`boolean`

true to switch the engine at once.

##### disableAutoStart

`boolean`

true to stop the engine from starting by itself.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setEngineOn(vehicle, true, true, false);
```

***

### setExclusiveDriver()

> **setExclusiveDriver**(`vehicle`, `ped`, `index`): `void`

Sets the exclusive driver of a vehicle: the only ped that may drive it.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### ped

`number` \| \{ `handle`: `number`; \}

The ped, or its handle.

##### index

`number`

The seat index, as an integer.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setExclusiveDriver(vehicle, ped, -1);
```

***

### setExplodesOnHighExplosionDamage()

> **setExplodesOnHighExplosionDamage**(`vehicle`, `toggle`): `void`

Sets whether a vehicle explodes on high explosion damage.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to explode on high explosion damage, false to not.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setExplodesOnHighExplosionDamage(vehicle, true);
```

***

### setFixed()

> **setFixed**(`vehicle`): `void`

Repairs a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setFixed(vehicle);
```

***

### setForwardSpeed()

> **setForwardSpeed**(`vehicle`, `speed`): `void`

Sets the forward speed of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### speed

`number`

The speed in metres per second.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setForwardSpeed(vehicle, 20);
```

***

### setFrictionOverride()

> **setFrictionOverride**(`vehicle`, `friction`): `void`

Sets the friction override of a vehicle (how well its tyres grip).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### friction

`number`

The friction as a float, the game's own scale.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setFrictionOverride(vehicle, 1.0);
```

***

### setFullbeam()

> **setFullbeam**(`vehicle`, `toggle`): `void`

Turns a vehicle's full-beam headlights on or off.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true for full beam, false for low beam.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setFullbeam(vehicle, true);
```

***

### setGravity()

> **setGravity**(`vehicle`, `toggle`): `void`

Sets whether a vehicle has gravity.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to apply gravity, false to turn it off.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setGravity(vehicle, false);
```

***

### setHandbrake()

> **setHandbrake**(`vehicle`, `toggle`): `void`

Sets or releases a vehicle's handbrake.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to set the handbrake, false to release it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setHandbrake(vehicle, true);
```

***

### setHasBeenOwnedByPlayer()

> **setHasBeenOwnedByPlayer**(`vehicle`, `owned`): `void`

Sets whether a vehicle counts as owned by a player.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### owned

`boolean`

true to mark the vehicle as owned by a player.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setHasBeenOwnedByPlayer(vehicle, true);
```

***

### setHasMutedSirens()

> **setHasMutedSirens**(`vehicle`, `toggle`): `void`

Mutes or unmutes the sirens of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to mute the sirens, false to unmute them.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setHasMutedSirens(vehicle, true);
```

***

### setHasStrongAxles()

> **setHasStrongAxles**(`vehicle`, `toggle`): `void`

Sets whether a vehicle has strong axles.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true for strong axles, false for normal ones.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setHasStrongAxles(vehicle, true);
```

***

### setHasUnbreakableLights()

> **setHasUnbreakableLights**(`vehicle`, `p1`): `void`

Sets whether a vehicle's lights can break.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### p1

`boolean`

true to make the lights unbreakable, false to let them break.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setHasUnbreakableLights(vehicle, true);
```

***

### setIndicatorLights()

> **setIndicatorLights**(`vehicle`, `turnSignal`, `toggle`): `void`

Turns a vehicle's indicator lights on or off.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### turnSignal

`number` \| `boolean`

The indicator, as a flag of the game.

##### toggle

`boolean`

true to turn the indicator on, false to turn it off.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setIndicatorLights(vehicle, true, true);
```

***

### setIndividualDoorsLocked()

> **setIndividualDoorsLocked**(`vehicle`, `doorIndex`, `destroyType`): `void`

Sets the lock state of one door of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### doorIndex

`number`

The door, as an integer.

##### destroyType

`number`

The kind of destruction the door takes, as an integer of the game's own values.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setIndividualDoorsLocked(vehicle, 0, 0);
```

***

### setInteriorlight()

> **setInteriorlight**(`vehicle`, `toggle`): `void`

Turns a vehicle's interior light on or off.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to turn the interior light on, false to turn it off.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setInteriorlight(vehicle, true);
```

***

### setIsConsideredByPlayer()

> **setIsConsideredByPlayer**(`vehicle`, `toggle`): `void`

Sets whether the game treats a vehicle as the player's own.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to treat the vehicle as the player's own, false to not.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setIsConsideredByPlayer(vehicle, true);
```

***

### setIsRacing()

> **setIsRacing**(`vehicle`, `toggle`): `void`

Marks a vehicle as racing: the game treats it as a racing vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to mark the vehicle as racing, false to clear it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setIsRacing(vehicle, true);
```

***

### setIsStolen()

> **setIsStolen**(`vehicle`, `isStolen`): `void`

Marks a vehicle as stolen or not.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### isStolen

`boolean`

true to mark the vehicle as stolen.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setIsStolen(vehicle, true);
```

***

### setLightMultiplier()

> **setLightMultiplier**(`vehicle`, `multiplier`): `void`

Sets the light multiplier of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### multiplier

`number`

The multiplier, as a number.

#### Returns

`void`

#### Remarks

SixL passes the value to the game as a flag: a true or non-zero value turns the multiplier on.

#### Example

```ts
mp.game.vehicle.setLightMultiplier(vehicle, 1);
```

***

### setLights()

> **setLights**(`vehicle`, `state`): `void`

Sets the lights of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### state

`number`

The light state, as an integer of the game's own values.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setLights(vehicle, 2);
```

***

### setLodMultiplier()

> **setLodMultiplier**(`vehicle`, `multiplier`): `void`

Sets the level-of-detail multiplier of a vehicle (how far away its detail is kept).

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### multiplier

`number`

The multiplier as a float, the game's own scale.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setLodMultiplier(vehicle, 1.0);
```

***

### setModelIsSuppressed()

> **setModelIsSuppressed**(`model`, `suppressed`): `void`

The same as `setVehicleModelIsSuppressed`.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

##### suppressed

`boolean`

true to suppress the model, false to allow it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setModelIsSuppressed(mp.joaat('<model name>'), true);
```

***

### setModKit()

> **setModKit**(`vehicle`, `modKit`): `void`

Sets the mod kit of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### modKit

`number`

The mod kit's id, as an integer.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setModKit(vehicle, 0);
```

***

### setNeedsToBeHotwired()

> **setNeedsToBeHotwired**(`vehicle`, `toggle`): `void`

Sets whether a vehicle must be hotwired to start.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

`true` to need it.

#### Returns

`void`

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.setNeedsToBeHotwired(vehicle, false);
```

***

### setOnGroundProperly()

> **setOnGroundProperly**(`vehicle`, `p1?`): `Promise`\<`boolean`\>

Puts a vehicle on the ground, aligned to the surface under it.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### p1?

`number` \| `boolean`

A flag of the game, a bool: SixL passes it as a flag.

#### Returns

`Promise`\<`boolean`\>

A Promise of true when the vehicle was placed on the ground.

#### Example

```ts
const placed = await mp.game.vehicle.setOnGroundProperly(vehicle, true);
```

***

### setOutOfControl()

> **setOutOfControl**(`vehicle`, `killDriver`, `explodeOnImpact`): `void`

Makes a vehicle go out of control.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### killDriver

`boolean`

true to kill the driver.

##### explodeOnImpact

`boolean`

true to make the vehicle explode on impact.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setOutOfControl(vehicle, false, true);
```

***

### setParkedVehicleDensityMultiplierThisFrame()

> **setParkedVehicleDensityMultiplierThisFrame**(`multiplier`): `void`

Sets the parked vehicle density for this frame.

#### Parameters

##### multiplier

`number`

The multiplier as a float; 1.0 is normal.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setParkedVehicleDensityMultiplierThisFrame(0.5);
```

***

### setPetrolTankHealth()

> **setPetrolTankHealth**(`vehicle`, `health`): `void`

Sets the petrol tank health of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### health

`number`

The petrol tank health on the 0..1000 scale (1000 is undamaged).

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setPetrolTankHealth(vehicle, 1000);
```

***

### setProvidesCover()

> **setProvidesCover**(`vehicle`, `toggle`): `void`

Sets whether a vehicle gives cover.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

`true` to give cover.

#### Returns

`void`

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.setProvidesCover(vehicle, true);
```

***

### setRandomBoats()

> **setRandomBoats**(`toggle`): `void`

Sets whether random boats spawn in the world.

#### Parameters

##### toggle

`boolean`

true to allow random boats, false to stop them.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setRandomBoats(false);
```

***

### setRandomTrains()

> **setRandomTrains**(`toggle`): `void`

Sets whether random trains spawn in the world.

#### Parameters

##### toggle

`boolean`

true to allow random trains, false to stop them.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setRandomTrains(false);
```

***

### setRandomVehicleDensityMultiplierThisFrame()

> **setRandomVehicleDensityMultiplierThisFrame**(`multiplier`): `void`

Sets the random vehicle density for this frame (the traffic that drives around).

#### Parameters

##### multiplier

`number`

The multiplier as a float; 1.0 is normal.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setRandomVehicleDensityMultiplierThisFrame(0.5);
```

***

### setSteerBias()

> **setSteerBias**(`vehicle`, `value`): `void`

Sets the steer bias of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### value

`number`

The bias as a float, the game's own scale.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setSteerBias(vehicle, 0.0);
```

***

### setStrong()

> **setStrong**(`vehicle`, `toggle`): `void`

Makes a vehicle strong (hard to damage) or not.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to make the vehicle strong, false to make it normal.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setStrong(vehicle, true);
```

***

### setTrainCruiseSpeed()

> **setTrainCruiseSpeed**(`train`, `speed`): `void`

Sets the cruise speed of a train.

#### Parameters

##### train

`number` \| \{ `handle`: `number`; \}

The train, or its handle.

##### speed

`number`

The cruise speed in metres per second.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setTrainCruiseSpeed(train, 10);
```

***

### setTrainSpeed()

> **setTrainSpeed**(`train`, `speed`): `void`

Sets the speed of a train.

#### Parameters

##### train

`number` \| \{ `handle`: `number`; \}

The train, or its handle.

##### speed

`number`

The speed in metres per second.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setTrainSpeed(train, 10);
```

***

### setTyreBurst()

> **setTyreBurst**(`vehicle`, `index`, `onRim`, `p3`): `void`

Bursts or repairs a tyre of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### index

`number`

The tyre, as an integer.

##### onRim

`boolean`

true to leave the tyre burst on the rim.

##### p3

`number`

A float of the game, as the game defines it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setTyreBurst(vehicle, 0, true, 1.0);
```

***

### setTyreFixed()

> **setTyreFixed**(`vehicle`, `tyreIndex`): `void`

Fixes a tyre of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### tyreIndex

`number`

The tyre, as an integer.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setTyreFixed(vehicle, 0);
```

***

### setTyresCanBurst()

> **setTyresCanBurst**(`vehicle`, `toggle`): `void`

Sets whether a vehicle's tyres can burst.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to allow the tyres to burst, false to forbid it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setTyresCanBurst(vehicle, false);
```

***

### setUndriveable()

> **setUndriveable**(`vehicle`, `toggle`): `void`

Makes a vehicle undriveable or driveable again.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to make the vehicle undriveable, false to make it driveable.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setUndriveable(vehicle, false);
```

***

### setVehicleDensityMultiplierThisFrame()

> **setVehicleDensityMultiplierThisFrame**(`multiplier`): `void`

Sets the vehicle density for this frame: how many vehicles the world spawns, relative to normal (1.0).

#### Parameters

##### multiplier

`number`

The multiplier as a float; 1.0 is normal, 0.0 spawns none.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setVehicleDensityMultiplierThisFrame(0.5);
```

***

### setVehicleModelIsSuppressed()

> **setVehicleModelIsSuppressed**(`model`, `suppressed`): `void`

Suppresses or allows a vehicle model: a suppressed model does not spawn in the world.

#### Parameters

##### model

`string` \| `number`

The model: its name, or its hash.

##### suppressed

`boolean`

true to suppress the model, false to allow it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setVehicleModelIsSuppressed(mp.joaat('<model name>'), true);
```

***

### setWheelsCanBreak()

> **setWheelsCanBreak**(`vehicle`, `enabled`): `void`

Sets whether a vehicle's wheels can break off.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### enabled

`boolean`

true to allow the wheels to break, false to forbid it.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setWheelsCanBreak(vehicle, false);
```

***

### setWheelsCanBreakOffWhenBlowUp()

> **setWheelsCanBreakOffWhenBlowUp**(`vehicle`, `toggle`): `void`

Sets whether a vehicle's wheels can break off when it blows up.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### toggle

`boolean`

true to let the wheels break off, false to keep them.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.setWheelsCanBreakOffWhenBlowUp(vehicle, false);
```

***

### skipTimeInPlaybackRecordedVehicle()

> **skipTimeInPlaybackRecordedVehicle**(`vehicle`, `time`): `void`

Skips a time along the playback of a recorded vehicle path.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### time

`number`

The time to skip, in milliseconds.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.skipTimeInPlaybackRecordedVehicle(vehicle, 1000);
```

***

### smashWindow()

> **smashWindow**(`vehicle`, `index`): `void`

Smashes a window of a vehicle.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

##### index

`number`

The window, as the game numbers it.

#### Returns

`void`

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.smashWindow(vehicle, 0);
```

***

### startAlarm()

> **startAlarm**(`vehicle`): `void`

Starts a vehicle's alarm.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Remarks

Partial: the game's call is an unnamed one that is only a candidate: not yet confirmed in the game.

#### Example

```ts
mp.game.vehicle.startAlarm(vehicle);
```

***

### stopPlaybackRecordedVehicle()

> **stopPlaybackRecordedVehicle**(`vehicle`): `void`

Stops the playback of a recorded vehicle path.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.stopPlaybackRecordedVehicle(vehicle);
```

***

### trackVisibility()

> **trackVisibility**(`vehicle`): `void`

Makes the game track a vehicle's visibility on screen.

#### Parameters

##### vehicle

`number` \| \{ `handle`: `number`; \}

The vehicle, or its handle.

#### Returns

`void`

#### Example

```ts
mp.game.vehicle.trackVisibility(vehicle);
```
