SetPedAnimation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 7: Line 7:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool setPedAnimation ( ped thePed, string block, string anim, [ bool loop ] )
bool setPedAnimation ( ped thePed, string block, string anim, [ bool loop ] )
</syntaxhighlight>
Or, to stop the current animation:
<syntaxhighlight lang="lua">
bool setPedAnimation ( ped thePed, bool false )
</syntaxhighlight>
</syntaxhighlight>



Revision as of 10:57, 11 June 2008

Sets the current animation of a player or ped.

Syntax

bool setPedAnimation ( ped thePed, string block, string anim, [ bool loop ] )

Or, to stop the current animation:

bool setPedAnimation ( ped thePed, bool false )

Required Arguments

  • thePed: the player or ped you want to apply an animation to.
  • block: the animation block's name.
  • anim: the name of the animation within the block.
  • loop: indicates whether or not the animation will loop.

Returns

Returns true if succesful, false otherwise.

Example

See Also