SetPedAnimationSpeed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(new func)
 
No edit summary
Line 1: Line 1:
{{Needs Checking|incomplete}}
__NOTOC__
{{Server client function}}
{{New feature/item|3.0156|1.5.5|14219|
Sets the current animation speed of a player or ped.
}}


bool setPedAnimationSpeed ( ped thePed, string anim, float speed )
==Syntax==
<syntaxhighlight lang="lua">
bool setPedAnimationSpeed ( ped thePed [, string anim = "", float speed = 1.0 ] )
</syntaxhighlight>
{{OOP||[[ped]]:setAnimationProgress}}


Allows you to set the speed of any running animation from 0.0 - 1.0.
===Required Arguments===
*'''thePed:''' the [[player]] or [[ped]] you want to change animation speed of.
 
===Optional Arguments===
*'''anim:''' the animation name it will affect.
*'''speed:''' a [[float]] containing the speed between 0.0–1.0 you want to apply to the animation.
 
===Returns===
Returns ''true'' if successful, ''false'' otherwise.
 
==Example==
{{Example}}
 
==See Also==
{{Ped_functions}}

Revision as of 10:53, 6 September 2018

Sets the current animation speed of a player or ped.

Syntax

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

OOP Syntax Help! I don't understand this!

Method: ped:setAnimationProgress(...)


Required Arguments

  • thePed: the player or ped you want to change animation speed of.

Optional Arguments

  • anim: the animation name it will affect.
  • speed: a float containing the speed between 0.0–1.0 you want to apply to the animation.

Returns

Returns true if successful, false otherwise.

Example

Accessories-text-editor.png Script Example Missing Function SetPedAnimationSpeed needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.
-- TODO


See Also