PlayerClient1 output

getEntityPlayerIsFreeAimingAt

GET_ENTITY_PLAYER_IS_FREE_AIMING_AT0x2975C866E6713290

The GTA V native GET_ENTITY_PLAYER_IS_FREE_AIMING_AT of the PLAYER namespace, as LS:MP client scripts call it: the global function getEntityPlayerIsFreeAimingAt, in JavaScript and in Lua.

SignatureJavaScript
getEntityPlayerIsFreeAimingAt(player: Player): [ok: boolean, entity: Entity]
SignatureLua
getEntityPlayerIsFreeAimingAt(player: Player): boolean, Entity

Usage

JavaScript
const [ok, entity] = getEntityPlayerIsFreeAimingAt(player);
Lua
local ok, entity = getEntityPlayerIsFreeAimingAt(player)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2entityEntitynumberintegeroutput

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns TRUE if it found an entity in your crosshair within range of your weapon. Assigns the handle of the target to the *entity that you pass it.
Returns false if no entity found.

Reference

Namespace
Player PLAYER
In the game
BOOL GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(Player player, Entity* entity)
Hash
0x2975C866E6713290

Open in the interactive natives reference