Difference between revisions of "01B9"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with '{{OpCode | ini = 01B9=2,set_actor %1d% armed_weapon_to %2d% | description = Sets an actor's armed weapon. | p1 = Actor variable | p2 = Weapon ID numb…')
 
(page updates)
Line 1: Line 1:
{{OpCode
+
{{Icon|t}} '''SET_CURRENT_CHAR_WEAPON'''
| ini        = 01B9=2,set_actor %1d% armed_weapon_to %2d%
+
<hr />
| description = Sets an actor's armed weapon
+
'''Description'''
| p1          = Actor variable
+
: Sets the current weapon of the character
| p2          = Weapon ID number
+
'''Syntax'''
| game        = [[GTA III]], [[Vice City]], [[San Andreas]]
+
: 01B9: set_actor [''char handle''] armed_weapon_to [''int'']
}}
+
'''Parameter'''
 +
: [''char handle'']
 +
:: The handle of the character
 +
: [''int'']
 +
:: [[Weapon#Lists of Weapons|Weapon number]]
  
This opcode sets the weapon that the actor is currently holding.  
+
This opcode sets the current weapon of the character. It has no effect if the character does not have the weapon.
  
== Sanny Builder example ==
+
== Keywords ==
 +
set, current, character, actor, weapon, arm, armed
  
<source lang="scm">01B9: set_actor 2@ armed_weapon_to 0</source>
+
[[Category:OpCodes]]
 
 
==Keywords==
 
weapons
 

Revision as of 05:05, 31 July 2015

GTA III Vice City San Andreas SET_CURRENT_CHAR_WEAPON


Description

Sets the current weapon of the character

Syntax

01B9: set_actor [char handle] armed_weapon_to [int]

Parameter

[char handle]
The handle of the character
[int]
Weapon number

This opcode sets the current weapon of the character. It has no effect if the character does not have the weapon.

Keywords

set, current, character, actor, weapon, arm, armed