getEntityAnimCurrentTime
GET_ENTITY_ANIM_CURRENT_TIME0x346D81500D088F42The GTA V native GET_ENTITY_ANIM_CURRENT_TIME of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityAnimCurrentTime, in JavaScript and in Lua.
getEntityAnimCurrentTime(
entity: Entity,
animDict: string,
animName: string
): numbergetEntityAnimCurrentTime(
entity: Entity,
animDict: string,
animName: string
): numberUsage
JavaScript
const value = getEntityAnimCurrentTime(entity, animDict, animName);Lua
local value = getEntityAnimCurrentTime(entity, animDict, animName)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
animDict | string | string | string |
animName | string | string | string |
Returns
float JavaScript number, Lua numberNotes
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 current playtime with respect to its total playtime. This value increasing in a range from [0 to 1] and wrap back to 0 when it reach 1.
Example:
0.000000 - mark the starting of animation.
0.500000 - mark the midpoint of the animation.
1.000000 - mark the end of animation.
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_CURRENT_TIME(Entity entity, const char* animDict, const char* animName)- Hash
0x346D81500D088F42