GraphicsClient

animpostfxPlay

ANIMPOSTFX_PLAY0x2206BF9A37B7F724

The GTA V native ANIMPOSTFX_PLAY of the GRAPHICS namespace, as LS:MP client scripts call it: the global function animpostfxPlay, in JavaScript and in Lua.

SignatureJavaScript
animpostfxPlay(effectName: string, duration: number, looped: boolean): void
SignatureLua
animpostfxPlay(effectName: string, duration: integer, looped: boolean)

Usage

JavaScript
animpostfxPlay(effectName, duration, looped);
Lua
animpostfxPlay(effectName, duration, looped)

Parameters

ParameterTypeJavaScriptLua
effectNamestringstringstring
durationintnumberinteger
loopedBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

duration - is how long to play the effect for in milliseconds. If 0, it plays the default length
if loop is true, the effect won't stop until you call animpostfxStop on it. (only loopable effects)

Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json

Reference

Namespace
Graphics GRAPHICS
In the game
void ANIMPOSTFX_PLAY(const char* effectName, int duration, BOOL looped)
Hash
0x2206BF9A37B7F724
Formerly
_START_SCREEN_EFFECT

Open in the interactive natives reference