Difference between revisions of "0114"

From GTAMods Wiki
Jump to navigation Jump to search
(page rewrite)
m
Line 1: Line 1:
{{Icon|t}} '''ADD_AMMO_TO_CHAR'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
'''Description'''
+
| command    = ADD_AMMO_TO_CHAR
: Adds ammo to the character's weapon
+
| description = Adds ammo to the character's weapon
'''Syntax'''
+
| syntax1    = 0114: add_ammo_to_actor [''char handle''] weapon [''int1''] rounds [''int2'']
: 0114: add_ammo_to_actor [''char handle''] weapon [''int1''] rounds [''int2'']
+
| p1t        = [''char handle'']
'''Parameter'''
+
| p1d        = The handle of the character
: [''char handle'']
+
| p2t        = [''int1'']
:: The handle of the character
+
| p2d        = [[Weapon#Lists of Weapons|Weapon number]]
: [''int1'']
+
| p3t        = [''int2'']
:: [[Weapon#Lists of Weapons|Weapon number]]
+
| p3d        = Ammo
: [''int2'']
+
}}
:: Ammo
 
  
 
This opcode adds ammo to the character's weapon. In GTA III, if the character does not have the weapon, the weapon will be given to it along with ammo. In Vice City, if the character does not have the weapon or another weapon of the same group, nothing happens. If the character does not have the weapon but does have another weapon of the same group, weapon ammo will be added for that weapon instead. This opcode was never called in the [[Main.scm|original script]] of GTA III. Legacy documentations had incorrectly described this opcode as setting ammo and working only while in a car.
 
This opcode adds ammo to the character's weapon. In GTA III, if the character does not have the weapon, the weapon will be given to it along with ammo. In Vice City, if the character does not have the weapon or another weapon of the same group, nothing happens. If the character does not have the weapon but does have another weapon of the same group, weapon ammo will be added for that weapon instead. This opcode was never called in the [[Main.scm|original script]] of GTA III. Legacy documentations had incorrectly described this opcode as setting ammo and working only while in a car.
Line 19: Line 18:
  
 
== See also ==
 
== See also ==
* [[0113]], adds ammo to the player's weapon
+
* {{Icon|3}} [[0113]], adds ammo to the player's weapon
* [[017B]], sets ammo to the character's weapon
 
 
 
[[Category:OpCodes]]
 

Revision as of 01:47, 12 December 2016

GTA III Vice City San Andreas ADD_AMMO_TO_CHAR


Description
Adds ammo to the character's weapon
Syntax
0114: add_ammo_to_actor [char handle] weapon [int1] rounds [int2]
Parameter
[char handle]
The handle of the character
[int1]
Weapon number
[int2]
Ammo

This opcode adds ammo to the character's weapon. In GTA III, if the character does not have the weapon, the weapon will be given to it along with ammo. In Vice City, if the character does not have the weapon or another weapon of the same group, nothing happens. If the character does not have the weapon but does have another weapon of the same group, weapon ammo will be added for that weapon instead. This opcode was never called in the original script of GTA III. Legacy documentations had incorrectly described this opcode as setting ammo and working only while in a car.

Keywords

add, character, actor, weapon, ammo

See also

  • GTA III 0113, adds ammo to the player's weapon