Scripting/Squirrel/Functions/Vector: 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
No edit summary
Line 11: Line 11:
* ''float'' '''Z''' - Z coordinate
* ''float'' '''Z''' - Z coordinate


 
== Functions ==
<pre>Length()</pre>
<pre>Distance( vector )</pre>
<pre>Dot( vector )</pre>
== Example ==
== Example ==



Revision as of 16:16, 8 November 2014

This function will teleport to the player to any location.

Syntax

Vector( X, Y, Z )

Arguments

  • float X - X coordinate
  • float Y - Y coordinate
  • float Z - Z coordinate

Functions

Length()
Distance( vector )
Dot( vector )

Example

In the following example the player will teleport to the coordinates represented in X, Y, Z.

player.Pos = Vector( 190.12, -122.45, 455.32 );

Notes

Player.Pos were used in this example. More info about them in the corresponding pages.

Related Functions