_GET_PLAYER_FREE_AIM_CLOSEST_ENTITY
Writes the entity closest to the free-aim reticle of player into entity, returning true if one was found.
Signature
BOOL _GET_PLAYER_FREE_AIM_CLOSEST_ENTITY(Player player, Entity* entity); // 0x7AE93C45EC14A166 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | player | Player |
| 2 | entity | Entity* (out pointer) |
Facts
| Name | _GET_PLAYER_FREE_AIM_CLOSEST_ENTITY |
|---|---|
| Hash | 0x7AE93C45EC14A166 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, entity = Citizen.InvokeNative(0x7AE93C45EC14A166, -- _GET_PLAYER_FREE_AIM_CLOSEST_ENTITY
PlayerId(), -- Player player
Citizen.PointerValueInt(), -- Entity* entity
Citizen.ReturnResultAnyway()
)
if result then
-- ...
endconst [result, entity] = Citizen.invokeNative("0x7AE93C45EC14A166", // _GET_PLAYER_FREE_AIM_CLOSEST_ENTITY
PlayerId(), // Player player
Citizen.pointerValueInt(), // Entity* entity
Citizen.returnResultAnyway()
);
if (result) {
// ...
}var entityArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x7AE93C45EC14A166, // _GET_PLAYER_FREE_AIM_CLOSEST_ENTITY
API.PlayerId(), // Player player
entityArg // Entity* entity
);
int entity = entityArg.GetResult<int>();Related PLAYER natives
- _GET_PLAYER_INTERACTION_AIM_ENTITY
- GET_ENTITY_PLAYER_IS_FREE_AIMING_AT
- _GET_PLAYER_CACHED_DEAD_EYE_AMOUNT
- _GET_PLAYER_DEAD_EYE
- _GET_PLAYER_DEAD_EYE_METER_LEVEL
- _GET_PLAYER_HEALTH
- _GET_PLAYER_HEALTH_RECHARGE_MULTIPLIER
- _GET_PLAYER_HUNTING_WAGON
- _GET_PLAYER_MAX_DEAD_EYE
- _GET_PLAYER_MOOD
- _GET_PLAYER_MOUNT_IS_SPRINTING_ON_ROAD
- _GET_PLAYER_OWNER_OF_MOUNT
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.