Difference between revisions of "017A"
Jump to navigation
Jump to search
(Created page with "{{Icon|3}} {{Icon|VC}} '''SET_PLAYER_AMMO''' <hr /> '''Description''' : Sets the player's weapon ammo '''Syntax''' : 017A: set_player [''player handle''] weapon [''int1''] amm...") |
m |
||
Line 13: | Line 13: | ||
:: Ammo | :: Ammo | ||
− | This opcode sets | + | 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 | + | 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. |
== Keywords == | == Keywords == | ||
Line 22: | Line 22: | ||
== See also == | == See also == | ||
* [[017B]], sets the character's weapon ammo | * [[017B]], sets the character's weapon ammo | ||
+ | * [[01B1]], gives a weapon to the player | ||
[[Category:OpCodes]] | [[Category:OpCodes]] |
Revision as of 18:43, 27 July 2015
Description
- Sets the player's weapon ammo
Syntax
- 017A: set_player [player handle] weapon [int1] ammo_to [int2]
Parameter
- [player handle]
- [int1]
- [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 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.
Keywords
set, player, weapon, ammo