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
local block, anim, options = getPedAnimation(localPlayer)
if block then
outputDebugString(("%s/%s, looped: %s"):format(block, anim, tostring(options.loop)))
end