# getPedAnimationProgress (Cliente)

> Indica en qué punto está la animación que reproduce el ped, como la de `setPedAnimation`.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Función Lua
- **Lado**: Cliente
- **Categoría**: Animaciones
- **URL**: https://wiki.mymp.gg/es/getPedAnimationProgress

## Sintaxis

```lua
float getPedAnimationProgress(ped ped)
```

## Parámetros

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `ped` | `ped` | El ped o jugador. |

## Retorno

Un número de 0 (inicio) a 1 (fin), o `-1` si el ped no reproduce una animación con nombre o está fuera del alcance de streaming.

## Ejemplo

```lua
addEventHandler("onClientRender", root, function()
    local progress = getPedAnimationProgress(localPlayer)
    if progress >= 0 then
        dxDrawText(("%d%%"):format(progress * 100), 20, 300)
    end
end)
```

## Ver también

- [setPedAnimationProgress (Cliente)](https://wiki.mymp.gg/es/setPedAnimationProgress.md): Salta una animación que el ped reproduce a un punto de ella. Sin anim, detiene la animación de setPedAnimation.
- [getPedAnimationLength (Cliente)](https://wiki.mymp.gg/es/getPedAnimationLength.md): Indica la duración de la animación que reproduce el ped, como la de setPedAnimation.
- [getPedAnimation (Cliente)](https://wiki.mymp.gg/es/getPedAnimation.md): Indica qué animación de setPedAnimation reproduce un ped en este cliente.
