Difference between revisions of "0AB0"

From GTAMods Wiki
Jump to navigation Jump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== 0AB0 ==
+
{{This|For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05EE.}}
 +
{{OpCode
 +
| games      = {{Icon|t}} (with [[CLEO]])
 +
| description = Checks if the key is pressed
 +
| syntax1    = 0AB0:   key_pressed [''int'']
 +
| p1t        = [''int'']
 +
| p1d        = Virtual key number
 +
}}
  
This is a special keypress opcode, used to see if the player pressed a certain key. It is very similar to 00E1, but varies slightly; it has a wider array of keys to choose from. Here's a cleo script example:
+
This conditional [[CLEO]] opcode returns true if the key is pressed. Practically any keys on the keyboard and mouse can be checked. It is unlike [[00E1]] which depends on and is limited by the game's control scheme.
  
 +
== Keywords ==
 +
keypress, key, press, button
  
== Example ==
+
== External links ==
 +
* [http://www.indigorose.com/webhelp/ams/Program_Reference/Misc/Virtual_Key_Codes.htm List of virtual key codes]
 +
* [http://msdn.microsoft.com/en-us/library/dd375731%28VS.85%29.aspx Another list of virtual key codes]
  
<nowiki>
+
[[Category:CLEO Opcodes]]
{$CLEO .cs}
 
 
 
thread 'KEYPRF'
 
 
 
:START
 
wait 0 ms
 
if
 
Player.Defined($PLAYER_CHAR)
 
jf @START
 
if
 
0AB0: key_pressed 48
 
jf @START
 
0A93: end_custom_thread
 
</nowiki>
 
 
 
== Other Info ==
 
 
 
 
 
 
 
 
 
 
 
It checks if the player pressed key 48 (1) then ends the thread. (Kinda useless but good example XD)
 
 
 
[http://www.indigorose.com/webhelp/ams/Program_Reference/Misc/Virtual_Key_Codes.htm Here's a full keylist, credits to Indigo Rose]
 

Latest revision as of 23:03, 27 August 2016

For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05EE.

GTA III Vice City San Andreas (with CLEO)


Description
Checks if the key is pressed
Syntax
0AB0:   key_pressed [int]
Parameter
[int]
Virtual key number

This conditional CLEO opcode returns true if the key is pressed. Practically any keys on the keyboard and mouse can be checked. It is unlike 00E1 which depends on and is limited by the game's control scheme.

Keywords

keypress, key, press, button

External links