ADD_SHOCKING_EVENT_FOR_ENTITY
Creates a shocking event of type eventType tied to entity that nearby peds can react to, and returns its handle.
Signature
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); // 0x7FD8F3BE76F89422 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | eventType | Hash |
| 2 | entity | Entity |
| 3 | p2 | float |
| 4 | p3 | float |
| 5 | p4 | float |
| 6 | p5 | float |
| 7 | p6 | float |
| 8 | p7 | float |
| 9 | p8 | BOOL |
| 10 | p9 | BOOL |
| 11 | p10 | int |
| 12 | p11 | int |
Facts
| Name | ADD_SHOCKING_EVENT_FOR_ENTITY |
|---|---|
| Hash | 0x7FD8F3BE76F89422 |
| Namespace | |
| Returns | ScrHandle |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local scrHandle = Citizen.InvokeNative(0x7FD8F3BE76F89422, -- ADD_SHOCKING_EVENT_FOR_ENTITY
GetHashKey("name"), -- Hash eventType
PlayerPedId(), -- Entity entity
0.0, -- float p2
0.0, -- float p3
0.0, -- float p4
0.0, -- float p5
0.0, -- float p6
0.0, -- float p7
false, -- BOOL p8
false, -- BOOL p9
0, -- int p10
0, -- int p11
Citizen.ResultAsInteger()
)
print(scrHandle)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const scrHandle = Citizen.invokeNative("0x7FD8F3BE76F89422", // ADD_SHOCKING_EVENT_FOR_ENTITY
GetHashKey("name"), // Hash eventType
PlayerPedId(), // Entity entity
0.0, // float p2
0.0, // float p3
0.0, // float p4
0.0, // float p5
0.0, // float p6
0.0, // float p7
false, // BOOL p8
false, // BOOL p9
0, // int p10
0, // int p11
Citizen.resultAsInteger()
);
console.log(scrHandle)int scrHandle = Function.Call<int>((Hash)0x7FD8F3BE76F89422, // ADD_SHOCKING_EVENT_FOR_ENTITY
(uint)API.GetHashKey("name"), // Hash eventType
API.PlayerPedId(), // Entity entity
0.0f, // float p2
0.0f, // float p3
0.0f, // float p4
0.0f, // float p5
0.0f, // float p6
0.0f, // float p7
false, // BOOL p8
false, // BOOL p9
0, // int p10
0 // int p11
);Related EVENT natives
- ADD_SHOCKING_EVENT_AT_POSITION
- _EVENT_GET_SOURCE_ENTITY_FROM_EVENT
- _EVENT_GET_TARGET_ENTITY_FROM_EVENT
- _ADD_MODEL_TO_EVENT_MONITOR
- _CREATE_SHOCKING_EVENT
- _EVENT_FLUSH_ALL_EVENT_TRACKERS
- _EVENT_GET_RECENT_EVENT
- _EVENT_GET_TIME_SINCE_EVENT
- _SET_EVENT_TRACKER_FOR_PED
- IS_SHOCKING_EVENT_IN_SPHERE
- REMOVE_SHOCKING_EVENT
- REMOVE_SHOCKING_EVENT_SPAWN_BLOCKING_AREAS
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.