_GET_PLAYER_FREE_AIM_CLOSEST_ENTITY
Returns true if any entity have been found closest to where the player is aiming at (like 5m max far).
Hash
0x7AE93C45EC14A166Runtime name
GetPlayerFreeAimClosestEntityNamespacePLAYER
SideClient
NameCommunity guess
Docs
Since build1207
Signature
BOOL _GET_PLAYER_FREE_AIM_CLOSEST_ENTITY(Player player, Entity* entity);Parameters
| Name | Type | Description |
|---|---|---|
player | Player | — |
entity | Entity* | — |
Returns BOOL
Description
Returns true if any entity have been found closest to where the player is aiming at (like 5m max far). Seems to only work on human peds
Parameters:
- entity: Entity* - Pointer of closest entity.
Returns:
- success: bool - True if entity found, false otherwise.
Example video:
- https://imgur.com/a/JiqTmYl
Only used in script function PROCESS_PED_INTERRUPT_DIALOGUE
_GET_PLAYER_*
Usage
local retval, entity = GetPlayerFreeAimClosestEntity(player, entity)
-- always works, by hash
local retval, entity = Citizen.InvokeNative(0x7AE93C45EC14A166, player, Citizen.PointerValueIntInitialized(entity), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, entity] = GetPlayerFreeAimClosestEntity(player, entity);
// by hash
const [retval, entity] = Citizen.invokeNative('0x7AE93C45EC14A166', player, Citizen.pointerValueIntInitialized(entity), Citizen.returnResultAnyway());var entity = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x7AE93C45EC14A166, player, entity);
// entity.GetResult<int>()- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.