Native referenceRedM

TRIGGER_SCRIPT_EVENT

0x5AE99C571D5BBE5D SCRIPTS
FUNCTION SIGNATURE
void TRIGGER_SCRIPT_EVENT(int eventGroup, int* eventData, int eventDataSize, int playerBits);
Property Value
Native Name TRIGGER_SCRIPT_EVENT
Hash 0x5AE99C571D5BBE5D
Return Type void
Build 1207
Parameters eventGroup (int), eventData (int*), eventDataSize (int), playerBits (int)

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)

Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!).

playerBits (also known as playersToBroadcastTo) is a bitset that indicates which players this event should be sent to. In order to send the event to specific players only, use (1 << playerIndex). Set all bits if it should be broadcast to all players.

Usage

Lua (Direct):

TriggerScriptEvent(eventGroup, eventData, eventDataSize, playerBits)

Lua (Hash):

Citizen.InvokeNative(0x5AE99C571D5BBE5D, eventGroup, eventData, eventDataSize, playerBits)
Back to SCRIPTS