TRIGGER_SCRIPT_EVENT
Sends a script event with the payload eventData to the players whose bits are set in playerBits.
Signature
void TRIGGER_SCRIPT_EVENT(int eventGroup, Any* eventData, int eventDataSize, int scriptMetadataIndex, int* playerBits); // 0x5AE99C571D5BBE5D b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | eventGroup | int |
| 2 | eventData | Any* (out pointer) |
| 3 | eventDataSize | int |
| 4 | scriptMetadataIndex | int |
| 5 | playerBits | int* (out pointer) |
Facts
| Name | TRIGGER_SCRIPT_EVENT |
|---|---|
| Hash | 0x5AE99C571D5BBE5D |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local eventData, playerBits = Citizen.InvokeNative(0x5AE99C571D5BBE5D, -- TRIGGER_SCRIPT_EVENT
0, -- int eventGroup
Citizen.PointerValueInt(), -- Any* eventData
0, -- int eventDataSize
0, -- int scriptMetadataIndex
Citizen.PointerValueInt() -- int* playerBits
)
print(eventData, playerBits)const [eventData, playerBits] = Citizen.invokeNative("0x5AE99C571D5BBE5D", // TRIGGER_SCRIPT_EVENT
0, // int eventGroup
Citizen.pointerValueInt(), // Any* eventData
0, // int eventDataSize
0, // int scriptMetadataIndex
Citizen.pointerValueInt() // int* playerBits
);
console.log(eventData, playerBits)var eventDataArg = new OutputArgument();
var playerBitsArg = new OutputArgument();
Function.Call((Hash)0x5AE99C571D5BBE5D, // TRIGGER_SCRIPT_EVENT
0, // int eventGroup
eventDataArg, // Any* eventData
0, // int eventDataSize
0, // int scriptMetadataIndex
playerBitsArg // int* playerBits
);
int eventData = eventDataArg.GetResult<int>();
int playerBits = playerBitsArg.GetResult<int>();Related SCRIPT natives
- _TRIGGER_SCRIPT_EVENT_2
- _IS_BACKGROUND_SCRIPT
- BG_GET_SCRIPT_ID_FROM_NAME_HASH
- DOES_SCRIPT_EXIST
- DOES_SCRIPT_WITH_NAME_HASH_EXIST
- GET_EVENT_AT_INDEX
- GET_EVENT_DATA
- GET_EVENT_EXISTS
- GET_HASH_OF_THIS_SCRIPT_NAME
- GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
- HAS_SCRIPT_LOADED
- HAS_SCRIPT_WITH_NAME_HASH_LOADED
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.