# getPedAnimationProgress (Client)

> Tells how far along the animation the ped is playing is, such as one from `setPedAnimation`.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Animations
- **URL**: https://wiki.mymp.gg/en/getPedAnimationProgress

## Syntax

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |

## Returns

A number from 0 (start) to 1 (end), or `-1` if the ped plays no named animation or is streamed out.

## Example

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

## See also

- [setPedAnimationProgress (Client)](https://wiki.mymp.gg/en/setPedAnimationProgress.md): Jumps an animation the ped is playing to a point in it. Without anim, it stops the setPedAnimation animation.
- [getPedAnimationLength (Client)](https://wiki.mymp.gg/en/getPedAnimationLength.md): Tells the length of the animation the ped is playing, such as one from setPedAnimation.
- [getPedAnimation (Client)](https://wiki.mymp.gg/en/getPedAnimation.md): Tells which setPedAnimation animation a ped is playing on this client.
