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…')
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 01B9=2,set_actor %1d% armed_weapon_to %2d%
+
| games      = {{Icon|t}}
| description = Sets an actor's armed weapon. 
+
| command    = SET_CURRENT_CHAR_WEAPON
| p1          = Actor variable
+
| description = Sets the current [[weapon]] of the character
| p2          = Weapon ID number
+
| syntax1    = 01B9: set_actor [''char handle''] armed_weapon_to [''int'']
| game        = [[GTA III]], [[Vice City]], [[San Andreas]]
+
| p1t        = [''char handle'']
 +
| p1d        = The handle of the character
 +
| p2t        = [''int'']
 +
| p2d        = [[Weapon#Lists of weapons|Weapon type]]
 
}}
 
}}
  
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>
 
 
 
==Keywords==
 
weapons
 

Latest revision as of 19:32, 7 July 2017

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 type

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