alt.Player.local.vehicle

Get the player's current vehicle.

Syntax

readonly vehicle: Vehicle | null;

Example Usage

const vehicle = alt.Player.local.vehicle;

if (!vehicle) {
    console.log('YOU ARE NOT IN A VEHICLE');
    return;
}

alt.Player.local can also be a player instance from server

results matching ""

    No results matching ""