_EVENT_GET_SOURCE_ENTITY_FROM_EVENT
Returns the source entity of a tracked event of type eventType recorded on the entity.
Signature
Entity _EVENT_GET_SOURCE_ENTITY_FROM_EVENT(Entity entity, Hash eventType, int p2, int p3); // 0x822A001BCEA5BD81 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | eventType | Hash |
| 3 | p2 | int |
| 4 | p3 | int |
Facts
| Name | _EVENT_GET_SOURCE_ENTITY_FROM_EVENT |
|---|---|
| Hash | 0x822A001BCEA5BD81 |
| Namespace | |
| Returns | Entity |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local entity = Citizen.InvokeNative(0x822A001BCEA5BD81, -- _EVENT_GET_SOURCE_ENTITY_FROM_EVENT
PlayerPedId(), -- Entity entity
GetHashKey("name"), -- Hash eventType
0, -- int p2
0, -- int p3
Citizen.ResultAsInteger()
)
print(entity)const entity = Citizen.invokeNative("0x822A001BCEA5BD81", // _EVENT_GET_SOURCE_ENTITY_FROM_EVENT
PlayerPedId(), // Entity entity
GetHashKey("name"), // Hash eventType
0, // int p2
0, // int p3
Citizen.resultAsInteger()
);
console.log(entity)int entity = Function.Call<int>((Hash)0x822A001BCEA5BD81, // _EVENT_GET_SOURCE_ENTITY_FROM_EVENT
API.PlayerPedId(), // Entity entity
(uint)API.GetHashKey("name"), // Hash eventType
0, // int p2
0 // int p3
);Related EVENT natives
- _EVENT_GET_TARGET_ENTITY_FROM_EVENT
- _EVENT_GET_RECENT_EVENT
- _EVENT_GET_TIME_SINCE_EVENT
- _EVENT_FLUSH_ALL_EVENT_TRACKERS
- ADD_SHOCKING_EVENT_FOR_ENTITY
- _ADD_MODEL_TO_EVENT_MONITOR
- _CREATE_SHOCKING_EVENT
- _IS_EVENT_TRACKER_ACTIVE
- _SET_EVENT_TRACKER_FOR_PED
- ADD_SHOCKING_EVENT_AT_POSITION
- IS_SHOCKING_EVENT_IN_SPHERE
- REMOVE_SHOCKING_EVENT
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.