Difference between revisions of "0494"

From GTAMods Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
<code>0494=5,%1h% %2d% %3d% %4d% %5d% </code><br>
+
{{OpCode
'''Description''': Gets the joystick data<br>
+
| ini        = 0494=5,%1h% %2d% %3d% %4d% %5d%
'''Parameter 1''': Controller number (usually 0)<br>
+
| description = Gets the joystick data
'''Parameter 2''': Value to store the integer<br>
+
| p1          = Controller number (usually 0)
'''Parameter 3''': Value to store the integer<br>
+
| p2          = Value to store the integer
'''Parameter 4''': Value to store the integer<br>
+
| p3          = Value to store the integer
'''Parameter 5''': Value to store the integer<br>
+
| p4          = Value to store the integer
'''Supports''': GTA3, Vice City, San Andreas<br>
+
| p5          = Value to store the integer
 
+
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
 +
}}
 
Parameter 1 returns -128 when pressing the left button and 128 when pressing the right button.<br>
 
Parameter 1 returns -128 when pressing the left button and 128 when pressing the right button.<br>
 
Parameter 2 returns -128 when pressing the up button and 128 when pressing the down button.<br>
 
Parameter 2 returns -128 when pressing the up button and 128 when pressing the down button.<br>
Line 13: Line 14:
 
Parameter 4 returns -128 when pressing the special control up button and 128 when pressing the special control down button.<br>
 
Parameter 4 returns -128 when pressing the special control up button and 128 when pressing the special control down button.<br>
  
This opcode is a useful alternate way of detecting certain [[00E1|keypresses]].
+
This opcode is a useful alternate way of detecting certain [[00E1|key presses]].
  
 
==Keywords==
 
==Keywords==
 
get, joystick
 
get, joystick
 
[[Category:OpCodes]]
 

Revision as of 09:17, 17 August 2009

{{{games}}}


Description
Gets the joystick data
Syntax
{{{syntax1}}}
Parameter

Parameter 1 returns -128 when pressing the left button and 128 when pressing the right button.
Parameter 2 returns -128 when pressing the up button and 128 when pressing the down button.
Parameter 3 returns -128 when pressing the special control left button and 128 when pressing the special control right button.
Parameter 4 returns -128 when pressing the special control up button and 128 when pressing the special control down button.

This opcode is a useful alternate way of detecting certain key presses.

Keywords

get, joystick