Difference between revisions of "010A"

From GTAMods Wiki
Jump to navigation Jump to search
(highlight)
 
Line 1: Line 1:
{{Icon|trilogy}} '''IS_SCORE_GREATER'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
'''Description'''
+
| command    = IS_SCORE_GREATER
: Checks if the player has more than enough money
+
| description = Checks if the player has more than enough money
'''Syntax'''
+
| syntax1    = 010A:  player [''player handle''] money > [''int'']
: 010A:  player [''player handle''] money > [''int'']
+
| p1t        = [''player handle'']
'''Parameter'''
+
| p1d        = The [[0053|handle of the player]]
: [''player handle'']
+
| p2t        = [''int'']
:: The handle of the player
+
| p2d        = Money
: [''int'']
+
| native      = [[IS_SCORE_GREATER]]
:: Money
+
}}
'''Native analog'''
 
: [[IS_SCORE_GREATER]]
 
  
 
This conditional opcode returns true if the player's money is greater than (but not equal to) the value.
 
This conditional opcode returns true if the player's money is greater than (but not equal to) the value.
  
 
== Example ==
 
== Example ==
The following example, using Sanny Builder, lets you decrease your money by $1000 by pressing the CAMERA key, as long as you have more than $999.
+
The following example, using Sanny Builder, lets you decrease your money by $1000 by pressing [[00E1|button 13]] (CAMERA key), as long as you have more than $999.
<source lang="scm">
+
{{Pre|class=sb-code|1=
0109: player $PLAYER_CHAR money += 2500
+
[[0109]]: player <span class="nv">$PLAYER_CHAR</span> money += <span class="m">2500</span>
  
while true
+
<span class="k">while</span> <span class="k">true</span>
     wait 10
+
     <span class="k">wait</span> <span class="m">10</span>
     if  
+
     <span class="k">if</span>
         00E1:  key_pressed 0 13  // camera key
+
         [[00E1]]:  key_pressed <span class="m">0</span> <span class="m">13</span> <span class="c1">// camera key</span>
     then
+
     <span class="k">then</span>
         if
+
         <span class="k">if</span>
             010A:  player $PLAYER_CHAR money > 999
+
             010A:  player <span class="nv">$PLAYER_CHAR</span> money &gt; <span class="m">999</span>
         then
+
         <span class="k">then</span>
             0109: player $PLAYER_CHAR money += -1000
+
             [[0109]]: player <span class="nv">$PLAYER_CHAR</span> money += -<span class="m">1000</span>
         end
+
         <span class="k">end</span>
     end
+
     <span class="k">end</span>
end
+
<span class="k">end</span>
</source>
+
}}
  
 
== Keywords ==
 
== Keywords ==
 
player, check, money, cash, greater, more, than
 
player, check, money, cash, greater, more, than
  
==See also==
+
== See also ==
* [[0109]] &ndash; adds the player's money
+
* {{Icon|t}} [[0109]], adds the player's money
* [[010B]] &ndash; stores the player's money
+
* {{Icon|t}} [[010B]], stores the player's money
 
 
[[Category:OpCodes]]
 

Latest revision as of 01:19, 4 December 2016

GTA III Vice City San Andreas IS_SCORE_GREATER


Description
Checks if the player has more than enough money
Syntax
010A: player [player handle] money > [int]
Parameter
[player handle]
The handle of the player
[int]
Money
Native analog
IS_SCORE_GREATER

This conditional opcode returns true if the player's money is greater than (but not equal to) the value.

Example

The following example, using Sanny Builder, lets you decrease your money by $1000 by pressing button 13 (CAMERA key), as long as you have more than $999.

0109: player $PLAYER_CHAR money += 2500

while true
    wait 10
    if 
        00E1:   key_pressed 0 13  // camera key
    then
        if
            010A:   player $PLAYER_CHAR money > 999
        then
            0109: player $PLAYER_CHAR money += -1000
        end
    end
end

Keywords

player, check, money, cash, greater, more, than

See also

  • GTA III Vice City San Andreas 0109, adds the player's money
  • GTA III Vice City San Andreas 010B, stores the player's money