RedM Natives

ADD_SHOCKING_EVENT_FOR_ENTITY

Hash0x7FD8F3BE76F89422
Runtime nameAddShockingEventForEntity
NamespaceEVENT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x7FD8F3BE76F89422

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

Parameters

NameTypeDescription
eventTypeHash—
entityEntity—
p2float—
p3float—
p4float—
p5float—
p6float—
p7float—
p8BOOL—
p9BOOL—
p10int—
p11int—

Returns ScrHandle

Description

eventType: https://alloc8or.re/rdr3/doc/enums/eEventType.txt

Usage

Lua
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#
JavaScript
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());
C#
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.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.