speedVector

Used to get the current vehicle speed based on direction.

Returns a { x: number, y: number, z: number }.

Declaration

vehicle.speedVector: { x: number, y: number, z: number }

Usage

const currentSpeedVector = vehicle.speedVector;

Real World Example

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

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

results matching ""

    No results matching ""