Click or drag to resize

PlayerApplyAnimation Method (String, String, Single, Boolean, Boolean, Boolean, Boolean, Int32, Boolean)

Apply an animation to this player.

Namespace:  SampSharp.Entities.SAMP
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public void ApplyAnimation(
	string animationLibrary,
	string animationName,
	float fDelta,
	bool loop,
	bool lockX,
	bool lockY,
	bool freeze,
	int time,
	bool forceSync
)

Parameters

animationLibrary
Type: SystemString
The name of the animation library in which the animation to apply is in.
animationName
Type: SystemString
The name of the animation, within the library specified.
fDelta
Type: SystemSingle
The speed to play the animation (use 4.1).
loop
Type: SystemBoolean
Set to True for looping otherwise set to False for playing animation sequence only once.
lockX
Type: SystemBoolean
Set to False to return player to original x position after animation is complete for moving animations. The opposite effect occurs if set to True.
lockY
Type: SystemBoolean
Set to False to return player to original y position after animation is complete for moving animations. The opposite effect occurs if set to True.
freeze
Type: SystemBoolean
Will freeze the player in position after the animation finishes.
time
Type: SystemInt32
Timer in milliseconds. For a never ending loop it should be 0.
forceSync
Type: SystemBoolean
Set to true to force the player to sync animation with other players in all instances
Remarks
The forceSync parameter, in most cases is not needed since players sync animations themselves. The forceSync parameter can force all players who can see this player 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.
See Also