The Lab
PLAYER native

GET_PLAYER_INTERACTION_TARGET_ENTITY

returns BOOL4 paramsbuild 1207

Writes the entity player is targeting through the interaction lock-on into outEntity, returning true if any.

Signature

C
BOOL GET_PLAYER_INTERACTION_TARGET_ENTITY(Player player, Entity* outEntity, BOOL p2, BOOL p3); // 0x3EE1F7A8C32F24E1 b1207

Parameters

#NameType
1playerPlayer
2outEntityEntity* (out pointer)
3p2BOOL
4p3BOOL

Facts

Facts about GET_PLAYER_INTERACTION_TARGET_ENTITY
Name
GET_PLAYER_INTERACTION_TARGET_ENTITY
Hash
0x3EE1F7A8C32F24E1
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(0x3EE1F7A8C32F24E1, -- GET_PLAYER_INTERACTION_TARGET_ENTITY
  PlayerId(), -- Player player
  Citizen.PointerValueInt(), -- Entity* outEntity
  false, -- BOOL p2
  false, -- BOOL p3
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, outEntity] = Citizen.invokeNative("0x3EE1F7A8C32F24E1", // GET_PLAYER_INTERACTION_TARGET_ENTITY
  PlayerId(), // Player player
  Citizen.pointerValueInt(), // Entity* outEntity
  false, // BOOL p2
  false, // BOOL p3
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var outEntityArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x3EE1F7A8C32F24E1, // GET_PLAYER_INTERACTION_TARGET_ENTITY
  API.PlayerId(), // Player player
  outEntityArg, // Entity* outEntity
  false, // BOOL p2
  false // BOOL p3
);
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.