EntityClient

getEntityAnimTotalTime

GET_ENTITY_ANIM_TOTAL_TIME0x50BD2730B191E360

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

SignatureJavaScript
getEntityAnimTotalTime(
  entity: Entity,
  animDict: string,
  animName: string
): number
SignatureLua
getEntityAnimTotalTime(
  entity: Entity,
  animDict: string,
  animName: string
): number

Usage

JavaScript
const value = getEntityAnimTotalTime(entity, animDict, animName);
Lua
local value = getEntityAnimTotalTime(entity, animDict, animName)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
animDictstringstringstring
animNamestringstringstring

Returns

float JavaScript number, Lua number

Notes

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

Returns a float value representing animation's total playtime in milliseconds.

Example:
getEntityAnimTotalTime(playerId(),"amb@world_human_yoga@female@base","base_b")
return 20800.000000

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
float GET_ENTITY_ANIM_TOTAL_TIME(Entity entity, const char* animDict, const char* animName)
Hash
0x50BD2730B191E360

Open in the interactive natives reference