_TRIGGER_SCRIPT_EVENT_2
Hash
0x8B61C950A148FFA2Runtime name
TriggerScriptEvent_2NamespaceSCRIPT
SideClient
NameCommunity guess
Docs
Since build1207
Signature
void _TRIGGER_SCRIPT_EVENT_2(Any* eventData, int eventDataSize, int scriptMetadataIndex, int threadId);Parameters
| Name | Type | Description |
|---|---|---|
eventData | Any* | — |
eventDataSize | int | — |
scriptMetadataIndex | int | — |
threadId | int | — |
Returns void
Usage
local eventData = TriggerScriptEvent_2(eventDataSize, scriptMetadataIndex, threadId)
-- always works, by hash
local eventData = Citizen.InvokeNative(0x8B61C950A148FFA2, Citizen.PointerValueInt(), eventDataSize, scriptMetadataIndex, threadId)JavaScript and C#
const eventData = TriggerScriptEvent_2(eventDataSize, scriptMetadataIndex, threadId);
// by hash
const eventData = Citizen.invokeNative('0x8B61C950A148FFA2', Citizen.pointerValueInt(), eventDataSize, scriptMetadataIndex, threadId);var eventData = new OutputArgument();
Function.Call((Hash)0x8B61C950A148FFA2, eventData, eventDataSize, scriptMetadataIndex, threadId);
// eventData.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Any*arguments are often structs. Build them with a DataView buffer and pass it with:Buffer()— see the examples and notes below.- The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.