ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. setPedAnimationProgress

Function

setPedAnimationProgress

Server and clientPedsIdentical to MTA:SA

Seeks a ped's current animation to a chosen point (0 = start, 1 = end). On the server it applies to the animation set by the server's setPedAnimation and reaches every player. On the client it applies to an IFP file animation playing on a ped in this game, and the animation name must match the current one.

Syntax

bool setPedAnimationProgress(ped ped, string anim, float progress)

Arguments

pedped
A player or an NPC.
animstring
Name of the animation to seek (it must be the one playing).
progressfloat
Position from 0 (start) to 1 (end).

Returns

true on success, false when the ped is not playing that animation.

Example

setPedAnimation(ped, "ped", "WALK_civi", -1, true, false)
setPedAnimationProgress(ped, "WALK_civi", 0.5)

See also