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

Function

setPedAnimationSpeed

Server and clientPedsModified from MTA:SA

Changes the playback speed of a ped's current animation: 1 = normal, 0.5 = half speed, 0 = paused. On the server it applies to the animation from the server's setPedAnimation; on the client to an IFP file animation on a ped in this game.

Syntax

bool setPedAnimationSpeed(ped ped, string anim, float speed)

Arguments

pedped
A player or an NPC.
animstring
Name of the animation that is playing.Optional in MTA:SA: string anim = ""
speedfloat
Speed 0-1 (1 = normal).Optional in MTA:SA: float speed = 1.0

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

setPedAnimationSpeed(ped thePed, string anim = "", float speed = 1.0)

Returns

true on success.

Example

setPedAnimation(ped, "dancing", "dnce_M_a")
setPedAnimationSpeed(ped, "dnce_M_a", 0.5)

See also