RedM Natives

GET_EVENT_AT_INDEX

Returns event name hash:

Hash0xA85E614430EFF816
Runtime nameGetEventAtIndex
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xD8F66A3A60C62153

Signature

Hash GET_EVENT_AT_INDEX(int eventGroup, int eventIndex);

Parameters

NameTypeDescription
eventGroupint—
eventIndexint—

Returns Hash

Description

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

Returns event name hash: https://alloc8or.re/rdr3/doc/enums/eEventType.txt

Usage

Lua
local retval = GetEventAtIndex(eventGroup, eventIndex)

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

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

Enums and flags

Sources

alloc8or RDR3 NativeDB

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