Scripting/Squirrel/Functions/Player.AddSpeed: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary
 
Line 20: Line 20:
== Related Functions ==
== Related Functions ==


{{Scripting/Squirrel/Functions/Game_Functions}}
{{Scripting/Squirrel/Functions/Player_Functions}}
[[Category:Scripting/Squirrel/Functions/Game_Functions]]
[[Category:Scripting/Squirrel/Functions/Player_Functions]]

Latest revision as of 11:02, 26 April 2019

Add speed to a player.

Syntax

player.AddSpeed( Vector )

Arguments

  • Vector3 Vector - Speed vector (x, y, z)

Example

The command will boost the player to the sky with 5 additional speed.

function onPlayerCommand(player, cmd) {
  if (cmd == "up") {
    player.AddSpeed(Vector(0, 0, 5));
  }
}

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.