# getPedAnimation (Client)

> Tells which `setPedAnimation` animation a ped is playing on this client.

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

## Syntax

```lua
string|false getPedAnimation(ped ped)
```

## Parameters

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

## Returns

The block's name, the animation's name and a table with the options (`time`, `loop`, `updatePosition`, `interruptable`, `freezeLastFrame`, `blendTime`, `restoreTaskOnAnimEnd`). `false` if the ped plays none.

An animation with `loop` or `freezeLastFrame` still counts as playing while the ped is streamed out.

## Example

```lua
local block, anim, options = getPedAnimation(localPlayer)
if block then
    outputDebugString(("%s/%s, looped: %s"):format(block, anim, tostring(options.loop)))
end
```

## See also

- [setPedAnimation (Client)](https://wiki.mymp.gg/en/setPedAnimation.md): Makes a ped play an animation from a block, or stops the animation it is playing. The animation applies on this client only.
- [getPedAnimationProgress (Client)](https://wiki.mymp.gg/en/getPedAnimationProgress.md): Tells how far along the animation the ped is playing is, such as one from setPedAnimation.
- [getPedAnimationLength (Client)](https://wiki.mymp.gg/en/getPedAnimationLength.md): Tells the length of the animation the ped is playing, such as one from setPedAnimation.
