M MY Multiplayer: Wiki
Side
Kind

setPedAnimationProgress

Client

Jumps an animation the ped is playing to a point in it. Without anim, it stops the setPedAnimation animation.

bool setPedAnimationProgress(element ped [, string anim = nil, float progress = 0])

Parameters

NameTypeDescription
pedelementThe ped or player. An element with peds below it in the tree applies to all of them.
animstringThe animation's name, as given to setPedAnimation.default nil
progressfloatThe point, from 0 (start) to 1 (end).default 0

Returns

true if it was changed on the element given. false if it does not play that animation, is not a ped or is streamed out.

Example

setPedAnimation(localPlayer, "DANCING", "dance_loop")
setPedAnimationProgress(localPlayer, "dance_loop", 0.5)

See also