Player.Velocity

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

This function returns the players move speed as a Vector

Syntax

  1. Vector player.Velocity

Arguments

  • none

Example

This will tell the player how fast they are going when they type '/velocity'.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "velocity" )
  5. {
  6. MessagePlayer( "Your current velocity is - " + pPlayer.Velocity, pPlayer );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The function MessagePlayer and event onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox