Difference between revisions of "017B"
Jump to navigation
Jump to search
(Created page with '{{OpCode | ini = 017b=3,set_actor %1d% weapon %2d% ammo_to %3d% | description = Sets an actor's weapon ammo. | p1 = Actor variable | p2 = Weapon ID n…') |
(page updates) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{Icon|3}} {{Icon|SA}} '''SET_CHAR_AMMO''' |
− | | | + | <hr /> |
− | + | '''Description''' | |
− | + | : Sets the character's weapon ammo | |
− | + | '''Syntax''' | |
− | + | : 017B: set_actor [''char handle''] weapon [''int1''] ammo_to [''int2''] | |
− | + | '''Parameter''' | |
− | + | : [''char handle''] | |
+ | :: The handle of the character | ||
+ | : [''int1''] | ||
+ | :: [[Weapon#Lists of Weapons|Weapon number]] | ||
+ | : [''int2''] | ||
+ | :: Ammo | ||
− | This opcode sets | + | This opcode sets the character's weapon ammo. If the character does not have the weapon, the weapon is given to it. Unlike opcode [[01B2]], it sets rather than adds to the ammo count and does not set the weapon as the current one for the character. You have to use opcode [[01B9]] to set it as the current one. When the character dies, it drops the weapon as a [[0213#Weapons|pickup type 4 with predefined ammo count]]. This opcode was never called in the [[Main.scm|original script]] of GTA III. |
− | == | + | == Keywords == |
+ | set, character, actor, weapon, ammo | ||
− | + | [[Category:OpCodes]] | |
− | |||
− | |||
− |
Revision as of 22:51, 26 July 2015
Description
- Sets the character's weapon ammo
Syntax
- 017B: set_actor [char handle] weapon [int1] ammo_to [int2]
Parameter
- [char handle]
- The handle of the character
- [int1]
- [int2]
- Ammo
This opcode sets the character's weapon ammo. If the character does not have the weapon, the weapon is given to it. Unlike opcode 01B2, it sets rather than adds to the ammo count and does not set the weapon as the current one for the character. You have to use opcode 01B9 to set it as the current one. When the character dies, it drops the weapon as a pickup type 4 with predefined ammo count. This opcode was never called in the original script of GTA III.
Keywords
set, character, actor, weapon, ammo