M MY Multiplayer: Wiki
Lado
Tipo

getPedAnimationLength

Cliente

Indica la duración de la animación que reproduce el ped, como la de setPedAnimation.

float getPedAnimationLength(ped ped)

Parámetros

NombreTipoDescripción
pedpedEl ped o jugador.

Retorno

La duración en segundos, o -1 si el ped no reproduce una animación con nombre o está fuera del alcance de streaming.

Ejemplo

local length = getPedAnimationLength(localPlayer)
if length > 0 then
    local left = length * (1 - getPedAnimationProgress(localPlayer))
    outputDebugString(("%.1f s left"):format(left))
end

Ver también