id

Used to get the current vehicle's server-side id which corresponds on client-side.

Returns a number.

Declaration

vehicle.id: number

Usage

const currentID = vehicle.id;

Real World Example

// Check if the local player is in a vehicle.
if (alt.Player.local.vehicle) {
    console.log(`ID is: ${alt.Player.local.vehicle.id}`);
}

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

results matching ""

    No results matching ""