Opcode Database

Latest Forum Activity

GTAG - Modding - Opcode Database - 01B2

Opcode Database

01B2

DescriptionGives a weapon to an actor with the specified amount of ammunition/bullets.

The weapons model must be loaded before trying to give the weapon. The ammo is usually limited to 99999 using this opcode.
Parameters (v2)1) Actor handle (Integer) (INT)
2) Weapon ID (Integer) (INT)
3) Integer (INT)
Gamessa vc iii
CategoryActor, Common, Weapon
Command Name (IV)GIVE_WEAPON_TO_CHAR
San Andreas
sascm.ini01B2=3,give_weapon_to_char %1d% weapon %2d% ammo %3d%
Example01B2: give_weapon_to_char 2@ weapon 28 ammo 60
Command NameGIVE_WEAPON_TO_CHAR
Vice City
sascm.ini01b2=3,give_actor %1d% weapon %2c% ammo %3d% ;; Load the weapon model before using this
Example01B2: give_actor $723 weapon 23 ammo 9999 // Load the weapon model before using this
Command NameGIVE_WEAPON_TO_CHAR
GTA III
gtascm.ini01b2=3,give_actor %1d% weapon %2c% ammo %3d%
Example01B2: give_actor $CHAR_GUNSHOPOWNER weapon 4 ammo 999
Command NameGIVE_WEAPON_TO_CHAR

<< 01B1

01B4 >>