animpostfxPlay
ANIMPOSTFX_PLAY0x2206BF9A37B7F724The 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.
animpostfxPlay(effectName: string, duration: number, looped: boolean): voidanimpostfxPlay(effectName: string, duration: integer, looped: boolean)Usage
JavaScript
animpostfxPlay(effectName, duration, looped);Lua
animpostfxPlay(effectName, duration, looped)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
effectName | string | string | string |
duration | int | number | integer |
looped | BOOL | boolean | boolean |
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