valid

Used to get if the vehicle if currently valid and can be destroyed.

Returns a boolean.

Declaration

vehicle.valid: boolean;

Usage

const isValid = vehicle.valid;

Real World Example

if (alt.Player.local.vehicle && alt.Player.local.vehicle.valid) {
    console.log('do something with the valid vehicle');
}

These examples assume you have vehicle created or available on server-side

results matching ""

    No results matching ""