Knowledge from the fieldRedM

GetAnimDuration (0x9FFAF4940A54CC09) returns SECONDS, not milliseconds

learning:63

GetAnimDuration (0x9FFAF4940A54CC09) returns SECONDS, not milliseconds

Context

GetAnimDuration(dict, name) returns the clip length as a float in seconds. Code that feeds it directly into a millisecond-based wait/timeout (e.g. TaskPlayAnim duration, SetTimeout) is off by 1000×.

The fix

local ms = GetAnimDuration(dict, name) * 1000

Also

It's a float-returning native — when called via Citizen.InvokeNative (rather than the named wrapper) you must append Citizen.ResultAsFloat() or you get a BOOL back (see the float-return InvokeNative finding / learning:24).

Verified

animation/client.lua:38return GetAnimDuration(dict, name) * 1000.


Tags: animation, getanimduration, return-value, units, seconds, resultasfloat
Category: natives
Source: jo_libs-fleet
Created: 2026-05-31T09:41:59.041Z

Back to documentation