Native referenceRedM

_ANIMPOSTFX_HAS_EVENT_TRIGGERED

0xFBF161FCFEC8589E GRAPHICS
FUNCTION SIGNATURE
BOOL _ANIMPOSTFX_HAS_EVENT_TRIGGERED(char* effectName, int eventType, BOOL peekOnly, BOOL* isRegistered);
Property Value
Native Name _ANIMPOSTFX_HAS_EVENT_TRIGGERED
Hash 0xFBF161FCFEC8589E
Return Type BOOL
Build 1207
Parameters effectName (char*), eventType (int), peekOnly (BOOL), isRegistered (BOOL*)

Description: 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 (Direct):

local result = AnimpostfxHasEventTriggered(effectName, eventType, peekOnly, isRegistered)

Lua (Hash):

local result = Citizen.InvokeNative(0xFBF161FCFEC8589E, effectName, eventType, peekOnly, isRegistered)

Examples

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)
Back to GRAPHICS