Difference between revisions of "0109"

From GTAMods Wiki
Jump to navigation Jump to search
m
(new layout)
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}}
| ini        = 0109=2,{{hint|%1d%|parameter 1: handle}} {{hint|%2d%|parameter 2: integer}}
+
<hr />
| description = Adds the player's money
+
'''Description'''
| p1          = Player handle
+
: Adds the player's money
| p2          = Integer
+
'''Syntax'''
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
+
: 0109: player [''player handle''] money += [''int'']
| native      = [[ADD_SCORE]]
+
'''Parameters'''
}}
+
: [''player handle'']
Adds the integer value to the player's current amount of money. Negative values work. In GTA 3 and Vice City, the minimum money the player can hold using this opcode is $0. In San Andreas, it can go below $0.
+
:: The handle of the player
 +
: [''int'']
 +
:: Amount of money to add
 +
'''Native analog'''
 +
: [[ADD_SCORE]]
 +
 
 +
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{{Ref|1}}. Vice City introduced new upper limit $999,999,999, and the player's money can not go below $0. Negative money balance is possible in San Andreas along with the same upper limit.
  
 
==Keywords==
 
==Keywords==
player, add, money, cash
+
player, add, money, cash, score
 +
 
 +
==Notes==
 +
* {{Note|1}} {{GTAF|796495}} &ndash; Negative Money Amount Issue
 +
 
 +
[[Category:OpCodes]]

Revision as of 20:17, 22 June 2015

GTA III Vice City San Andreas


Description

Adds the player's money

Syntax

0109: player [player handle] money += [int]

Parameters

[player handle]
The handle of the player
[int]
Amount of money to add

Native analog

ADD_SCORE

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 new upper limit $999,999,999, and the player's money can not go below $0. Negative money balance is possible in San Andreas along with the same upper limit.

Keywords

player, add, money, cash, score

Notes