ApplyAnimation
From SA-MP Wiki
ApplyAnimation
Applies an animation to a player
(playerid, animlib[], animname[], Float:fS, opt1, opt2, opt3, opt4, opt5)
| playerid | The id of the player to apply the animation to. |
| animlib[] | The library name of the animation. |
| animname[] | The name of the animation. |
| opt1 | Loop 0/1. |
| opt2 | This can be named LockX. This basically stores the player position when they perform an animation that requires them to move. When the animation is done, it puts them back to their original position before the animation started, if set to 0. Opposite effect if it's set to 1. |
| opt3 | This can be named LockY. This basically stores the player position when they perform an animation that requires them to move. When the animation is done, it puts them back to their original position before the animation started, if set to 0. Opposite effect if it's set to 1. |
| opt4 | Will freeze the player in the position the animation finishes. |
| opt5 | Timer in millisecconds. For a never ending loop it should be 0. |
This function does not return a specific value.
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- ClearAnimations: Clear any animations a player is performing.
- SetPlayerSpecialAction: Set a player's special action.
