RedM Natives

REGISTER_RESOURCE_AS_EVENT_HANDLER

An internal function which allows the current resource's HLL script runtimes to receive state for the specified event.

Hash0xD233A168
Runtime nameRegisterResourceAsEventHandler
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

void REGISTER_RESOURCE_AS_EVENT_HANDLER(char* eventName);

Parameters

NameTypeDescription
eventNamechar*

An event name, or "*" to disable HLL event filtering for this resource.

Returns void

Description

Cfx.re native reference

An internal function which allows the current resource's HLL script runtimes to receive state for the specified event.

Usage

Lua
RegisterResourceAsEventHandler(eventName)

-- always works, by hash
Citizen.InvokeNative(0xd233a168, eventName)
JavaScript and C#
JavaScript
RegisterResourceAsEventHandler(eventName);

// by hash
Citizen.invokeNative('0xd233a168', eventName);
C#
Function.Call((Hash)0xd233a168, eventName);

Sources

Cfx.re native reference

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