Difference between revisions of "0170"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 0170=2,%2d% %1d%
+
| games      = {{Icon|3}} {{Icon|VC}}
| description = Gets the Z [[angle]] of the player
+
| command    = GET_PLAYER_HEADING
| p1          = Player handle
+
| description = Gets the [[heading]] of the player
| p2          = Variable to store the angle
+
| syntax1    = 0170: [''var''] = player [''player handle''] z_angle
| game        = GTA3, Vice City
+
| p1t        = [''player handle'']
 +
| p1d        = The [[0053|handle of the player]]
 +
| p2t        = [''var'']
 +
| p2d        = Variable to store the heading, a floating-point value
 
}}
 
}}
This gets the Z angle of the player and stores it into a variable. The angle is in degrees. This opcode does not work in San Andreas so use [[0172]] instead. Note that the parameters are swapped.
 
[[Sanny Builder]] example:<source lang="scm">0170: 0@ = player $PLAYER_CHAR Z_angle</source>
 
  
==Note==
+
This opcode gets the heading (z angle) of the player.
The above format is more commonly used. The actual format of this opcode is in order:<br>
 
<code>0170=2,%1d% %2d%</code><br>
 
The format to use depends on which INI file you use.
 
  
==Keywords==
+
{{direction|deg}}
get, store, player, angle
 
  
[[Category:OpCodes]]
+
== Keywords ==
 +
get, store, player, angle, heading
 +
 
 +
== See also ==
 +
* {{Icon|3}} {{Icon|VC}} [[0171]], sets the heading of the player
 +
* {{Icon|t}} [[0172]], gets the heading of the character

Latest revision as of 00:12, 20 November 2016

GTA III Vice City GET_PLAYER_HEADING


Description
Gets the heading of the player
Syntax
0170: [var] = player [player handle] z_angle
Parameter
[player handle]
The handle of the player
[var]
Variable to store the heading, a floating-point value

This opcode gets the heading (z angle) of the player.

Compass Degrees
North
West 90°
South 180°
East 270°

Keywords

get, store, player, angle, heading

See also

  • GTA III Vice City 0171, sets the heading of the player
  • GTA III Vice City San Andreas 0172, gets the heading of the character