RedM Natives

GET_NUMBER_OF_EVENTS

Hash0x5CE8DE5909565748
Runtime nameGetNumberOfEvents
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x5F92A689A06620AA

Signature

int GET_NUMBER_OF_EVENTS(int eventGroup);

Parameters

NameTypeDescription
eventGroupint—

Returns int

Description

eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork), 2 = unk, 3 = unk, 4 = SCRIPT_EVENT_QUEUE_ERRORS (CEventGroupScriptErrors)

Usage

Lua
local retval = GetNumberOfEvents(eventGroup)

-- always works, by hash
local retval = Citizen.InvokeNative(0x5CE8DE5909565748, eventGroup, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetNumberOfEvents(eventGroup);

// by hash
const retval = Citizen.invokeNative('0x5CE8DE5909565748', eventGroup, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x5CE8DE5909565748, eventGroup);

Sources

alloc8or RDR3 NativeDB

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