RedM Natives

_ANIMPOSTFX_HAS_EVENT_TRIGGERED

Returns true if an AnimPostFX event has just been triggered, using an effect name string.

Hash0xFBF161FCFEC8589E
Runtime nameAnimpostfxHasEventTriggered
NamespaceGRAPHICS
SideClient
NameCommunity guess
Docs
Since build1207

Signature

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

Parameters

NameTypeDescription
effectNameconst char*—
eventTypeint—
bPeekOnlyBOOL—
bIsRegisteredBOOL*—

Returns BOOL

Description

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".

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
local retval, bIsRegistered = AnimpostfxHasEventTriggered(effectName, eventType, bPeekOnly, bIsRegistered)

-- always works, by hash
local retval, bIsRegistered = Citizen.InvokeNative(0xFBF161FCFEC8589E, effectName, eventType, bPeekOnly, Citizen.PointerValueInt() --[[ BOOL* ]], Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
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#
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

LUA · VORPCORE RDR3natives
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.