Difference between revisions of "0056"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 0056=6,  player %1d% %6b% %2d% %3d% %4d% %5d%
+
| games      = {{Icon|3}} {{Icon|VC}}
| description = tests if a player is within an area
+
| command    = IS_PLAYER_IN_AREA_2D
| p1          = player handle
+
| description = Checks if the player is in the 2d area
| p2          = X1
+
| syntax1    = 0056:   player [''player handle''] [''int''] [''flt1''] [''flt2''] [''flt3''] [''flt4'']
| p3          = Y1
+
| p1t        = [''player handle'']
| p4          = X2
+
| p1d        = The [[0053|handle of the player]]
| p5          = Y2
+
| p2t        = [''flt1'']
| p6          = show marker flag
+
| p2d        = X-coordinate of one corner of area
| game        = GTA3, Vice City
+
| p3t        = [''flt2'']
 +
| p3d        = Y-coordinate of one corner of area
 +
| p4t        = [''flt3'']
 +
| p4d        = X-coordinate of other corner of area
 +
| p5t        = [''flt4'']
 +
| p5d        = Y-coordinate of other corner of area
 +
| p6t        = [''int'']
 +
| p6d        = Show cylindrical marker
 
}}
 
}}
  
This opcode checks if a player is within an area with given coordinates. X1Y1:X2Y2 is an area (rectangle) corners coordinates. The sixth parameter sets will there be a marker (blue or pink cylinder) (the code must be looped for marker to be visible).
+
This conditional opcode returns true if the player is in the rectangular area regardless of the player's z-coordinate. It allows you to mark the area's highest [[02CE|ground z]] with a cylindrical marker, colored blue in GTA III and pink in Vice City. The opcode must be placed in a loop with [[0001|wait]] 0 in order for the marker to remain drawn in the world. In GTA III only, if [[00C3|debug mode]] is switched on, a debug square will also be drawn along with the marker denoting the boundaries of the area.
[[Category:OpCodes]]
+
 
 +
== Keywords ==
 +
check, player, area, 2d, rectangle

Latest revision as of 15:52, 13 December 2016

GTA III Vice City IS_PLAYER_IN_AREA_2D


Description
Checks if the player is in the 2d area
Syntax
0056:   player [player handle] [int] [flt1] [flt2] [flt3] [flt4]
Parameter
[player handle]
The handle of the player
[flt1]
X-coordinate of one corner of area
[flt2]
Y-coordinate of one corner of area
[flt3]
X-coordinate of other corner of area
[flt4]
Y-coordinate of other corner of area
[int]
Show cylindrical marker

This conditional opcode returns true if the player is in the rectangular area regardless of the player's z-coordinate. It allows you to mark the area's highest ground z with a cylindrical marker, colored blue in GTA III and pink in Vice City. The opcode must be placed in a loop with wait 0 in order for the marker to remain drawn in the world. In GTA III only, if debug mode is switched on, a debug square will also be drawn along with the marker denoting the boundaries of the area.

Keywords

check, player, area, 2d, rectangle