_EVENT_GET_TARGET_ENTITY_FROM_EVENT
Hash
0x38497F139981C5C9Runtime name
EventGetTargetEntityFromEventNamespaceEVENT
SideClient
NameCommunity guess
Docs
Since build1207
Signature
Entity _EVENT_GET_TARGET_ENTITY_FROM_EVENT(Entity entity, Hash eventType, int p2, int p3);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
eventType | Hash | — |
p2 | int | — |
p3 | int | — |
Returns Entity
Usage
local retval = EventGetTargetEntityFromEvent(entity, eventType, p2, p3)
-- always works, by hash
local retval = Citizen.InvokeNative(0x38497F139981C5C9, entity, eventType, p2, p3, Citizen.ResultAsInteger())JavaScript and C#
const retval = EventGetTargetEntityFromEvent(entity, eventType, p2, p3);
// by hash
const retval = Citizen.invokeNative('0x38497F139981C5C9', entity, eventType, p2, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x38497F139981C5C9, entity, eventType, p2, p3);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`. - The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Enums and flags
- eEventType 492 values
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.