float getPedAnimationLength(ped ped)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
| ped | ped | O ped ou jogador. |
Retorno
A duração em segundos, ou -1 se o ped não toca uma animação nomeada ou está fora do alcance de streaming.
Exemplo
local length = getPedAnimationLength(localPlayer)
if length > 0 then
local left = length * (1 - getPedAnimationProgress(localPlayer))
outputDebugString(("%.1f s left"):format(left))
end