RedM Natives

ADD_SHOCKING_EVENT_AT_POSITION

Hash0xD9F8455409B525E9
Runtime nameAddShockingEventAtPosition
NamespaceEVENT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xD9F8455409B525E9

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);

Parameters

NameTypeDescription
eventTypeHash—
xfloat—
yfloat—
zfloat—
p4float—
p5float—
p6float—
p7float—
p8float—
p9int—
p10int—

Returns ScrHandle

Description

eventType: https://alloc8or.re/rdr3/doc/enums/eEventType.txt
https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS

Usage

Lua
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#
JavaScript
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());
C#
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.InvokeNative needs the number — pass joaat("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. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Enums and flags

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.