Difference between revisions of "0109"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 0109=2,%1d% %2d%
+
| games      = {{Icon|t}}
 +
| command    = ADD_SCORE
 
| description = Adds the player's money
 
| description = Adds the player's money
| p1          = Player handle
+
| syntax1    = 0109: player [''player handle''] money += [''int'']
| p2          = Integer
+
| p1t        = [''player handle'']
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
+
| p1d        = The [[0053|handle of the player]]
 +
| p2t        = [''int'']
 +
| p2d        = Amount of money to add
 
| native      = [[ADD_SCORE]]
 
| native      = [[ADD_SCORE]]
 
}}
 
}}
Adds the value in the second parameter to the player's current amount of money. Negative values work. In GTA 3 and Vice City, the minimum the player can hold is $0. In San Andreas, it can go below $0.
 
  
==Keywords==
+
This opcode adds the integer value to the player's current amount of money. A negative value subtracts the player's money.
player, add, money
+
 
 +
GTA III's upper limit for the money balance is $2,147,483,647. An additional reward will cause an integer overflow and the money negates to -$2,147,483,648.{{Ref|1}} Vice City introduced a new upper limit of $999,999,999, and the player's money cannot go below $0. Negative money balance is possible in San Andreas along with the same upper limit.
 +
 
 +
== Keywords ==
 +
player, add, money, cash, score
 +
 
 +
== See also ==
 +
* {{Icon|t}} [[010A]], checks if the player's money is greater than value
 +
* {{Icon|t}} [[010B]], stores the player's money
 +
 
 +
== Reference ==
 +
* {{Note|1}} {{GTAF|796495}}, negative money issue discussion

Latest revision as of 01:25, 4 December 2016

GTA III Vice City San Andreas ADD_SCORE


Description
Adds the player's money
Syntax
0109: player [player handle] money += [int]
Parameter
[player handle]
The handle of the player
[int]
Amount of money to add
Native analog
ADD_SCORE

This opcode adds the integer value to the player's current amount of money. A negative value subtracts the player's money.

GTA III's upper limit for the money balance is $2,147,483,647. An additional reward will cause an integer overflow and the money negates to -$2,147,483,648.[1] Vice City introduced a new upper limit of $999,999,999, and the player's money cannot go below $0. Negative money balance is possible in San Andreas along with the same upper limit.

Keywords

player, add, money, cash, score

See also

  • GTA III Vice City San Andreas 010A, checks if the player's money is greater than value
  • GTA III Vice City San Andreas 010B, stores the player's money

Reference