alt.Player.local.entityAimingAt

Get the vehicle, player, etc. that the player is aiming at.

Syntax

readonly entityAimingAt: Entity | null;

Example Usage

const target = player.entityAimingAt;

if (target !== someOtherPlayer || target !== someOtherVehicle) {
    // not aiming at the entity we are looking for
    return;
}

// is aiming at the entity we are looking for

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

results matching ""

    No results matching ""