Player.SetAnim

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function sets players animation.

Syntax

  1. bool player.SetAnim( int anim )

Arguments

  • anim - The ID of the animation to play

Example

This will play the specified anim when the player types '/anim <anim id>'

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "anim" )
  5. {
  6. if ( szText ) pPlayer.SetAnim( szText.tointeger() );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The event onPlayerCommand was used in this example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox