ADD_SHOCKING_EVENT_FOR_ENTITY
Hash
0x7FD8F3BE76F89422Runtime name
AddShockingEventForEntityNamespaceEVENT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x7FD8F3BE76F89422Signature
ScrHandle ADD_SHOCKING_EVENT_FOR_ENTITY(Hash eventType, Entity entity, float p2, float p3, float p4, float p5, float p6, float p7, BOOL p8, BOOL p9, int p10, int p11);Parameters
| Name | Type | Description |
|---|---|---|
eventType | Hash | — |
entity | Entity | — |
p2 | float | — |
p3 | float | — |
p4 | float | — |
p5 | float | — |
p6 | float | — |
p7 | float | — |
p8 | BOOL | — |
p9 | BOOL | — |
p10 | int | — |
p11 | int | — |
Returns ScrHandle
Description
eventType: https://alloc8or.re/rdr3/doc/enums/eEventType.txt
Usage
local retval = AddShockingEventForEntity(eventType, entity, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)
-- always works, by hash
local retval = Citizen.InvokeNative(0x7FD8F3BE76F89422, eventType, entity, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, Citizen.ResultAsInteger())JavaScript and C#
const retval = AddShockingEventForEntity(eventType, entity, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
// by hash
const retval = Citizen.invokeNative('0x7FD8F3BE76F89422', eventType, entity, p2 + 0.0000001, p3 + 0.0000001, p4 + 0.0000001, p5 + 0.0000001, p6 + 0.0000001, p7 + 0.0000001, p8, p9, p10, p11, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x7FD8F3BE76F89422, eventType, entity, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);- 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`. - Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Enums and flags
- eEventType 492 values
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.