Player::getEntityIsFreeAimingAtRaw

From RAGE Multiplayer Wiki

JavaScript Syntax

Syntax

mp.game.player.getEntityIsFreeAimingAtRaw();

Return value

  • handle or undefined

Example

const targetEntity = mp.game.player.getEntityIsFreeAimingAtRaw();
if (targetEntity) {
    const ped = mp.peds.atHandle(targetEntity);
    if (ped && mp.peds.exists(ped)) {
        mp.gui.chat.push(`You are aiming at ped id ${ped.id}`);
    }
}


See also