Difference between revisions of "04B8"

From GTAMods Wiki
Jump to navigation Jump to search
(page updates)
m
Line 7: Line 7:
 
| p1d        = The handle of the character
 
| p1d        = The handle of the character
 
| p2t        = [''int'']
 
| p2t        = [''int'']
| p2d        = Slot
+
| p2d        = Slot + 1
 
| p3t        = [''var1'']
 
| p3t        = [''var1'']
 
| p3d        = Variable to store the weapon number
 
| p3d        = Variable to store the weapon number

Revision as of 20:05, 27 December 2016

Vice City San Andreas GET_CHAR_WEAPON_IN_SLOT


Description
Gets the character's weapon data in the weapon slot
Syntax
04B8: get_weapon_data_from_actor [char handle] slot [int] weapon [var1] ammo [var2] model [var3]
Parameter
[char handle]
The handle of the character
[int]
Slot + 1
[var1]
Variable to store the weapon number
[var2]
Variable to store the weapon ammo count
[var3]
Variable to store the weapon model index

This opcode gets the weapon number, ammo, and model in the weapon slot of the character. If there is no weapon for that slot, the weapon number returns 0 and the model returns -1.

Keywords

store, get, actor, character, weapon, number, model, slot