Difference between revisions of "017B"

From GTAMods Wiki
Jump to navigation Jump to search
(page updates)
m
Line 17: Line 17:
 
== Keywords ==
 
== Keywords ==
 
set, character, actor, weapon, ammo
 
set, character, actor, weapon, ammo
 +
 +
== See also ==
 +
* [[017A]], sets the player's weapon ammo
 +
* [[01B2]], gives a weapon to a character
  
 
[[Category:OpCodes]]
 
[[Category:OpCodes]]

Revision as of 18:46, 27 July 2015

GTA III San Andreas SET_CHAR_AMMO


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 number
[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

See also

  • 017A, sets the player's weapon ammo
  • 01B2, gives a weapon to a character