# GRAPHICS::_ANIMPOSTFX_HAS_EVENT_TRIGGERED

- **Hash:** `0xFBF161FCFEC8589E`
- **Namespace:** GRAPHICS
- **Runtime name (Lua/JS):** `AnimpostfxHasEventTriggered`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/GRAPHICS/_ANIMPOSTFX_HAS_EVENT_TRIGGERED

## Signature

```c
BOOL _ANIMPOSTFX_HAS_EVENT_TRIGGERED(const char* effectName, int eventType, BOOL bPeekOnly, BOOL* bIsRegistered);
```

## Parameters

- `effectName` (`const char*`)
- `eventType` (`int`)
- `bPeekOnly` (`BOOL`)
- `bIsRegistered` (`BOOL*`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Returns true if an AnimPostFX event has just been triggered, using an effect name string.
Same kind of event system as ANIMPOSTFX_HAS_EVENT_TRIGGERED_BY_STACKHASH, but keyed by effect name such as "ChapterTitle_IntroCh01".

*Source: VORPCORE RDR3natives*

Return true if the event have just been triggered. Literaly the same system of ANIMPOSTFX_HAS_EVENT_TRIGGERED_BY_STACKHASH, but works with a string.

## Usage

### Lua

```lua
local retval, bIsRegistered = AnimpostfxHasEventTriggered(effectName, eventType, bPeekOnly, bIsRegistered)

-- always available, by hash
local retval, bIsRegistered = Citizen.InvokeNative(0xFBF161FCFEC8589E, effectName, eventType, bPeekOnly, Citizen.PointerValueInt() --[[ BOOL* ]], Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, bIsRegistered] = AnimpostfxHasEventTriggered(effectName, eventType, bPeekOnly, bIsRegistered);

// by hash
const [retval, bIsRegistered] = Citizen.invokeNative('0xFBF161FCFEC8589E', effectName, eventType, bPeekOnly, Citizen.pointerValueInt() /* BOOL* */, Citizen.returnResultAnyway());
```

### C#

```csharp
var bIsRegistered = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xFBF161FCFEC8589E, effectName, eventType, bPeekOnly, bIsRegistered);
// bIsRegistered.GetResult<bool>()
```

- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- 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.

## Examples

*Source: VORPCORE RDR3natives*

```lua
CreateThread(function()
    AnimpostfxPlay("ChapterTitle_IntroCh01")
    while true do
        local hasEventTriggered1, isRegistered1 = AnimpostfxHasEventTriggered("ChapterTitle_IntroCh01", 1, false)
        local hasEventTriggered2, isRegistered2 = AnimpostfxHasEventTriggered("ChapterTitle_IntroCh01", 2, false)
        if (hasEventTriggered1) then
            print("AnimpostfxHasEventTriggered('ChapterTitle_IntroCh01', 1, false)", hasEventTriggered1)
        end
        if (hasEventTriggered2) then
            print("AnimpostfxHasEventTriggered('ChapterTitle_IntroCh01', 2, false)", hasEventTriggered2)
        end
        Wait(0)
    end
end)
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
