The Lab
EVENT native

_EVENT_GET_TARGET_ENTITY_FROM_EVENT

returns Entity4 paramsbuild 1207

Returns the target entity of a tracked event of type eventType recorded on the entity.

Signature

C
Entity _EVENT_GET_TARGET_ENTITY_FROM_EVENT(Entity entity, Hash eventType, int p2, int p3); // 0x38497F139981C5C9 b1207

Parameters

#NameType
1entityEntity
2eventTypeHash
3p2int
4p3int

Facts

Facts about _EVENT_GET_TARGET_ENTITY_FROM_EVENT
Name
_EVENT_GET_TARGET_ENTITY_FROM_EVENT
Hash
0x38497F139981C5C9
Namespace
Returns
Entity
Game build
1207

Examples

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

Lua
local entity = Citizen.InvokeNative(0x38497F139981C5C9, -- _EVENT_GET_TARGET_ENTITY_FROM_EVENT
  PlayerPedId(), -- Entity entity
  GetHashKey("name"), -- Hash eventType
  0, -- int p2
  0, -- int p3
  Citizen.ResultAsInteger()
)
print(entity)
JavaScript
const entity = Citizen.invokeNative("0x38497F139981C5C9", // _EVENT_GET_TARGET_ENTITY_FROM_EVENT
  PlayerPedId(), // Entity entity
  GetHashKey("name"), // Hash eventType
  0, // int p2
  0, // int p3
  Citizen.resultAsInteger()
);
console.log(entity)
C#
int entity = Function.Call<int>((Hash)0x38497F139981C5C9, // _EVENT_GET_TARGET_ENTITY_FROM_EVENT
  API.PlayerPedId(), // Entity entity
  (uint)API.GetHashKey("name"), // Hash eventType
  0, // int p2
  0 // int p3
);
All EVENT natives

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