Difference between revisions of "017A"

From GTAMods Wiki
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Icon|3}} {{Icon|VC}} '''SET_PLAYER_AMMO'''
+
{{OpCode
<hr />
+
| games      = {{Icon|3}} {{Icon|VC}}
'''Description'''
+
| command    = SET_PLAYER_AMMO
: Sets the player's weapon ammo
+
| description = Sets the player's [[weapon]] ammo
'''Syntax'''
+
| syntax1    = 017A: set_player [''player handle''] weapon [''int1''] ammo_to [''int2'']
: 017A: set_player [''player handle''] weapon [''int1''] ammo_to [''int2'']
+
| p1t        = [''player handle'']
'''Parameter'''
+
| p1d        = The [[0053|handle of the player]]
: [''player handle'']
+
| p2t        = [''int1'']
:: The [[0053|handle of the player]]
+
| p2d        = [[Weapon#Lists of weapons|Weapon type]]
: [''int1'']
+
| p3t        = [''int2'']
:: [[Weapon#Lists of Weapons|Weapon number]]
+
| p3d        = Ammo
: [''int2'']
+
}}
:: Ammo
 
  
 
This opcode sets your weapon ammo. Unlike opcode [[01B1]], it sets rather than adds to the ammo count and does not set the weapon as the current one for you. You have to use opcode [[01B8]] to set it as the current one.
 
This opcode sets your weapon ammo. Unlike opcode [[01B1]], it sets rather than adds to the ammo count and does not set the weapon as the current one for you. You have to use opcode [[01B8]] to set it as the current one.
  
In GTA III, if you do not have the weapon, the weapon will be given to you. In Vice City, if you do not have the weapon or another weapon of the same group, nothing happens. If you do not have the weapon but do have another weapon of the same group, weapon ammo will be set for that weapon instead. If this behavior is not wanted, you can use opcode [[0490]] to check if you have the weapon already.
+
In GTA III, if you do not have the weapon, the weapon will be given to you. In Vice City, if you do not have the weapon or another weapon of the same slot, nothing happens. If you do not have the weapon but do have another weapon of the same slot, weapon ammo will be set for that weapon instead. If this behavior is not wanted, you can use opcode [[0490]] to check if you have the weapon already.
  
 
== Keywords ==
 
== Keywords ==
Line 21: Line 20:
  
 
== See also ==
 
== See also ==
* [[017B]], sets the character's weapon ammo
+
* {{Icon|3}} {{Icon|SA}} [[017B]], sets the character's weapon ammo
* [[01B1]], gives a weapon to the player
+
* {{Icon|3}} {{Icon|VC}} [[01B1]], gives a weapon to the player
 
 
[[Category:OpCodes]]
 

Latest revision as of 19:17, 7 July 2017

GTA III Vice City SET_PLAYER_AMMO


Description
Sets the player's weapon ammo
Syntax
017A: set_player [player handle] weapon [int1] ammo_to [int2]
Parameter
[player handle]
The handle of the player
[int1]
Weapon type
[int2]
Ammo

This opcode sets your weapon ammo. Unlike opcode 01B1, it sets rather than adds to the ammo count and does not set the weapon as the current one for you. You have to use opcode 01B8 to set it as the current one.

In GTA III, if you do not have the weapon, the weapon will be given to you. In Vice City, if you do not have the weapon or another weapon of the same slot, nothing happens. If you do not have the weapon but do have another weapon of the same slot, weapon ammo will be set for that weapon instead. If this behavior is not wanted, you can use opcode 0490 to check if you have the weapon already.

Keywords

set, player, weapon, ammo

See also

  • GTA III San Andreas 017B, sets the character's weapon ammo
  • GTA III Vice City 01B1, gives a weapon to the player