Difference between revisions of "0171"

From GTAMods Wiki
Jump to navigation Jump to search
m
(updating page)
Line 1: Line 1:
{{OpCode
+
{{Icon|3}} {{Icon|VC}} '''SET_PLAYER_HEADING'''
| ini        = 0171=2,%1d% %2d%
+
<hr />
| description = Sets the Z [[angle]] of the player
+
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
| p1          = Player handle
+
'''Description'''
| p2          = Z angle
+
: Sets the heading of the player
| game        = GTA3, Vice City
+
'''Syntax'''
}}
+
: 0171: set_player [''player handle''] z_angle_to [''flt'']
This sets the Z angle of the player. The angle is in degrees. This opcode does not work in San Andreas so use [[0173]] instead.
+
'''Parameter'''
 +
: [''player handle'']
 +
:: The handle of the player
 +
: [''flt'']
 +
:: Z [[angle]] in degrees
  
==Keywords==
+
This opcode sets the heading (Z angle) of the player. Opcode [[0173]] is the equivalent for characters.
set, player, angle
+
}}</onlyinclude>
 +
 
 +
{{direction|deg=1}}
 +
 
 +
== Keywords ==
 +
set, player, angle, heading
  
 
[[Category:OpCodes]]
 
[[Category:OpCodes]]

Revision as of 19:15, 18 January 2012

GTA III Vice City SET_PLAYER_HEADING


Description

Sets the heading of the player

Syntax

0171: set_player [player handle] z_angle_to [flt]

Parameter

[player handle]
The handle of the player
[flt]
Z angle in degrees

This opcode sets the heading (Z angle) of the player. Opcode 0173 is the equivalent for characters.

Compass Degrees Radians
North 0
West 90° π/2 ≈ 1.57
South 180° π ≈ 3.14
East 270° 3π/2 ≈ 4.71

Keywords

set, player, angle, heading