ADD_SHOCKING_EVENT_AT_POSITION
Hash
0xD9F8455409B525E9Runtime name
AddShockingEventAtPositionNamespaceEVENT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xD9F8455409B525E9Signature
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);Parameters
| Name | Type | Description |
|---|---|---|
eventType | Hash | — |
x | float | — |
y | float | — |
z | float | — |
p4 | float | — |
p5 | float | — |
p6 | float | — |
p7 | float | — |
p8 | float | — |
p9 | int | — |
p10 | int | — |
Returns ScrHandle
Description
eventType: https://alloc8or.re/rdr3/doc/enums/eEventType.txt
https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS
Usage
local retval = AddShockingEventAtPosition(eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10)
-- always works, by hash
local retval = Citizen.InvokeNative(0xD9F8455409B525E9, eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10, Citizen.ResultAsInteger())JavaScript and C#
const retval = AddShockingEventAtPosition(eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10);
// by hash
const retval = Citizen.invokeNative('0xD9F8455409B525E9', eventType, x + 0.0000001, y + 0.0000001, z + 0.0000001, p4 + 0.0000001, p5 + 0.0000001, p6 + 0.0000001, p7 + 0.0000001, p8 + 0.0000001, p9, p10, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xD9F8455409B525E9, eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10);- 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.