EntityClient

isEntityPlayingAnim

IS_ENTITY_PLAYING_ANIM0x1F0B79228E461EC9

The GTA V native IS_ENTITY_PLAYING_ANIM of the ENTITY namespace, as LS:MP client scripts call it: the global function isEntityPlayingAnim, in JavaScript and in Lua.

SignatureJavaScript
isEntityPlayingAnim(
  entity: Entity,
  animDict: string,
  animName: string,
  taskFlag: number
): boolean
SignatureLua
isEntityPlayingAnim(
  entity: Entity,
  animDict: string,
  animName: string,
  taskFlag: integer
): boolean

Usage

JavaScript
const result = isEntityPlayingAnim(entity, animDict, animName, taskFlag);
Lua
local result = isEntityPlayingAnim(entity, animDict, animName, taskFlag)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
animDictstringstringstring
animNamestringstringstring
taskFlagintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

See also isScriptedScenarioPedUsingConditionalAnim

Taken from isEntityPlayingAnim(playerPedId(), "creatures@shark@move", "attack_player", 3)

p4 is always 3 in the scripts.

Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json

Reference

Namespace
Entity ENTITY
In the game
BOOL IS_ENTITY_PLAYING_ANIM(Entity entity, const char* animDict, const char* animName, int taskFlag)
Hash
0x1F0B79228E461EC9

Open in the interactive natives reference