Difference between revisions of "04B8"

From GTAMods Wiki
Jump to navigation Jump to search
(page updates)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 04B8=5,%1d% %2h% %3d% %4d% %5d%
+
| games      = {{Icon|VC}} {{Icon|SA}}
| description = Stores the [[weapon]]s data from an actor
+
| command    = GET_CHAR_WEAPON_IN_SLOT
| p1          = Actor handle
+
| description = Gets the character's [[weapon]] data in the weapon slot
| p2          = Weapon group
+
| syntax1    = 04B8: get_weapon_data_from_actor [''char handle''] slot [''int''] weapon [''var1''] ammo [''var2''] model [''var3'']
| p3          = A variable to store the weapon number
+
| p1t        = [''char handle'']
| p4          = A variable to store the weapon ammo
+
| p1d        = The handle of the character
| p5          = A variable to store the weapon model
+
| p2t        = [''int'']
| game        = [[Vice City]], [[San Andreas]]
+
| p2d        = Slot
 +
| p3t        = [''var1'']
 +
| p3d        = Variable to store the weapon number
 +
| p4t        = [''var2'']
 +
| p4d        = Variable to store the weapon ammo count
 +
| p5t        = [''var3'']
 +
| p5d        = Variable to store the weapon model index
 
}}
 
}}
This stores the weapon number, ammo, and model of the weapon in the weapon group of an actor. If there is no weapon for that weapon group, the weapon number returns 0 and the model returns -1.
 
  
==Keywords==
+
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''.
store, get, weapon, number, model
+
 
 +
== Keywords ==
 +
store, get, actor, character, weapon, number, model, slot

Revision as of 10:48, 3 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
[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