ADD_SHOCKING_EVENT_AT_POSITION
Creates a shocking event of type eventType at the given position that nearby peds can react to, and returns its handle.
Remove it with REMOVE_SHOCKING_EVENT when the scene is over.
Signature
ScrHandle ADD_SHOCKING_EVENT_AT_POSITION(Hash eventType, float x, float y, float z, float p4, float p5, float p6, float p7, float p8, int p9, int p10); // 0xD9F8455409B525E9 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | eventType | Hash |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
| 5 | p4 | float |
| 6 | p5 | float |
| 7 | p6 | float |
| 8 | p7 | float |
| 9 | p8 | float |
| 10 | p9 | int |
| 11 | p10 | int |
Facts
| Name | ADD_SHOCKING_EVENT_AT_POSITION |
|---|---|
| Hash | 0xD9F8455409B525E9 |
| 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(0xD9F8455409B525E9, -- ADD_SHOCKING_EVENT_AT_POSITION
GetHashKey("name"), -- Hash eventType
0.0, -- float x
0.0, -- float y
0.0, -- float z
0.0, -- float p4
0.0, -- float p5
0.0, -- float p6
0.0, -- float p7
0.0, -- float p8
0, -- int p9
0, -- int p10
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("0xD9F8455409B525E9", // ADD_SHOCKING_EVENT_AT_POSITION
GetHashKey("name"), // Hash eventType
0.0, // float x
0.0, // float y
0.0, // float z
0.0, // float p4
0.0, // float p5
0.0, // float p6
0.0, // float p7
0.0, // float p8
0, // int p9
0, // int p10
Citizen.resultAsInteger()
);
console.log(scrHandle)int scrHandle = Function.Call<int>((Hash)0xD9F8455409B525E9, // ADD_SHOCKING_EVENT_AT_POSITION
(uint)API.GetHashKey("name"), // Hash eventType
0.0f, // float x
0.0f, // float y
0.0f, // float z
0.0f, // float p4
0.0f, // float p5
0.0f, // float p6
0.0f, // float p7
0.0f, // float p8
0, // int p9
0 // int p10
);Related EVENT natives
- ADD_SHOCKING_EVENT_FOR_ENTITY
- _ADD_MODEL_TO_EVENT_MONITOR
- _CREATE_SHOCKING_EVENT
- _EVENT_FLUSH_ALL_EVENT_TRACKERS
- _EVENT_GET_RECENT_EVENT
- _EVENT_GET_SOURCE_ENTITY_FROM_EVENT
- _EVENT_GET_TARGET_ENTITY_FROM_EVENT
- _EVENT_GET_TIME_SINCE_EVENT
- IS_SHOCKING_EVENT_IN_SPHERE
- REMOVE_SHOCKING_EVENT
- REMOVE_SHOCKING_EVENT_SPAWN_BLOCKING_AREAS
- _IS_EVENT_TRACKER_ACTIVE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.