ApplyAnimation

From SA-MP Wiki

Revision as of 00:14, 19 May 2012; view current revision
←Older revision | Newer revision→
Jump to: navigation, search


Applies an animation to a player


Parameters:
(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
playeridThe ID of the player to apply the animation to.
animlib[]The library name of the animation.
animname[]The name of the animation.
fDeltaThe speed to play the animation.
loopSet to 1 for looping otherwise set to 0 for playing animation sequence only once.
lockxSet to 0 to return player to original x position after animation is complete for moving animations. The opposite effect occurs if set to 1.
lockySet to 0 to return player to original y position after animation is complete for moving animations. The opposite effect occurs if set to 1.
freezeWill freeze the player in position after the animation finishes.
timeTimer in milliseconds. For a never ending loop it should be 0.
forcesyncSet to 1 to force playerid to sync animation with other players in all instances (optional).


ReturnsThis function doesn't return a specific value


ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1,1);


Image:32px-Ambox_warning_orange.png Note: The 'forcesync' optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The 'forcesync' parameter can force all players who can see 'playerid' to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused.


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages