The Lab
PLAYER native

_GET_PLAYER_INTERACTION_AIM_ENTITY

returns BOOL2 paramsbuild 1207

Writes the entity player is aiming at in interaction mode into outEntity, returning true if any.

Signature

C
BOOL _GET_PLAYER_INTERACTION_AIM_ENTITY(Player player, Entity* outEntity); // 0xBEA3A6E5F5F79A6F b1207

Parameters

#NameType
1playerPlayer
2outEntityEntity* (out pointer)

Facts

Facts about _GET_PLAYER_INTERACTION_AIM_ENTITY
Name
_GET_PLAYER_INTERACTION_AIM_ENTITY
Hash
0xBEA3A6E5F5F79A6F
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, outEntity = Citizen.InvokeNative(0xBEA3A6E5F5F79A6F, -- _GET_PLAYER_INTERACTION_AIM_ENTITY
  PlayerId(), -- Player player
  Citizen.PointerValueInt(), -- Entity* outEntity
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, outEntity] = Citizen.invokeNative("0xBEA3A6E5F5F79A6F", // _GET_PLAYER_INTERACTION_AIM_ENTITY
  PlayerId(), // Player player
  Citizen.pointerValueInt(), // Entity* outEntity
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var outEntityArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xBEA3A6E5F5F79A6F, // _GET_PLAYER_INTERACTION_AIM_ENTITY
  API.PlayerId(), // Player player
  outEntityArg // Entity* outEntity
);
int outEntity = outEntityArg.GetResult<int>();
All PLAYER natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.