# SCRIPT::_TRIGGER_SCRIPT_EVENT_2

- **Hash:** `0x8B61C950A148FFA2`
- **Namespace:** SCRIPT
- **Runtime name (Lua/JS):** `TriggerScriptEvent_2`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/SCRIPT/_TRIGGER_SCRIPT_EVENT_2

## Signature

```c
void _TRIGGER_SCRIPT_EVENT_2(Any* eventData, int eventDataSize, int scriptMetadataIndex, int threadId);
```

## Parameters

- `eventData` (`Any*`)
- `eventDataSize` (`int`)
- `scriptMetadataIndex` (`int`)
- `threadId` (`int`)

## Returns

`void`

## Usage

### Lua

```lua
local eventData = TriggerScriptEvent_2(eventDataSize, scriptMetadataIndex, threadId)

-- always available, by hash
local eventData = Citizen.InvokeNative(0x8B61C950A148FFA2, Citizen.PointerValueInt(), eventDataSize, scriptMetadataIndex, threadId)
```

### JavaScript

```js
const eventData = TriggerScriptEvent_2(eventDataSize, scriptMetadataIndex, threadId);

// by hash
const eventData = Citizen.invokeNative('0x8B61C950A148FFA2', Citizen.pointerValueInt(), eventDataSize, scriptMetadataIndex, threadId);
```

### C#

```csharp
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 `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB.*
