gear

Used to set or get the current vehicle gear.

Returns a number.

Declaration

vehicle.gear: number

Usage

const currentGear = vehicle.gear;

// OR

vehicle.gear = 2;

Real World Example

// Check if the local player is in a vehicle.
if (alt.Player.local.vehicle) {
    alt.Player.local.vehicle.gear = 2;
}

These examples assume you have a vehicle available on client-side.

results matching ""

    No results matching ""