Weapon

From GTAModding
Jump to: navigation, search

A weapon is anything that can damage other objects, including vehicles and pedestrians. It is one of the core gameplay features of Grand Theft Auto.

Mission script

Opcodes

0113 GTA III adds ammo to the player's weapon
0114 GTA III Vice City San Andreas adds ammo to the character's weapon
017A GTA III Vice City sets the player's weapon ammo
017B GTA III San Andreas sets the character's weapon ammo
01B1 GTA III Vice City gives the weapon to the player
01B2 GTA III Vice City San Andreas gives the weapon to the character
01B8 GTA III Vice City sets the current weapon of the player
01B9 GTA III Vice City San Andreas sets the current weapon of the character
0213 GTA III Vice City San Andreas creates a pickup with predefined ammo
0237 GTA III Vice City San Andreas sets the gang's weapons
02D7 GTA III Vice City checks the current weapon of the player
02D8 GTA III Vice City San Andreas checks the current weapon of the character
02E2 GTA III Vice City San Andreas sets the character's weapon accuracy
031D GTA III Vice City San Andreas checks if the character is damaged by the weapon
031E GTA III Vice City San Andreas checks if the vehicle is damaged by the weapon
032B GTA III Vice City San Andreas creates a pickup with ammo
0419 GTA III Vice City gets the ammo of the player's weapon
041A GTA III gets the ammo of the character's weapon
0467 GTA III Vice City San Andreas clears the character's last weapon damage
0468 GTA III Vice City San Andreas clears the vehicle's last weapon damage
046F GTA III Vice City gets the player's current weapon
0470 GTA III Vice City San Andreas gets the character's current weapon
048F Vice City San Andreas removes all of the character's weapons
0490 Vice City checks if the player has the weapon
0491 San Andreas checks if the character has the weapon
04B8 Vice City San Andreas gets the character's weapon data
0501 Vice City San Andreas sets player can do drive by
0555 San Andreas removes the weapon from the character
0563 Vice City San Andreas ensures player has a drive-by weapon
06AB San Andreas hides all weapons
0713 San Andreas makes the character do drive bys
081A San Andreas sets the character's weapon skill
087E San Andreas sets the character to drop weapons after a death
0881 San Andreas sets the character be able to shoot
0946 San Andreas sets the character oblivious to weapon fire
0992 San Andreas sets the player's ability to scroll through weapons

Native functions

This section is incomplete. You can help by fixing and expanding it.

Lists of weapons

GTA 2

Type Enum Name Icon
0 PISTOL Pistol Pistol
1 MACHINE_GUN S-Uzi Machine Gun S-Uzi Machine Gun
2 ROCKET_LAUNCHER Rocket Launcher Rocket Launcher
3 ELECTRO_GUN ElectroGun ElectroGun
4 MOLOTOV Molotov Cocktails Molotov Cocktails
5 GRENADE Grenades Grenades
6 SHOTGUN Shotgun Shotgun
7 ELECTRO_BATON ElectroBaton ElectroBaton
8 FLAME_THROWER Flamethrower Flamethrower
9 SILENCED_MACHINE_GUN Silenced S-Uzi Machine Gun Silenced S-Uzi Machine Gun
10 DUAL_PISTOL Dual Pistol Dual Pistol
11 WEAPON_11 na Gta2 weapon11.png
12 WEAPON_12 na Gta2 weapon12.png
13 WEAPON_13 na Gta2 weapon13.png
14 WEAPON_14 na Gta2 weapon14.png

GTA III

Unlike in Vice City and San Andreas, where each weapon has a separate mesh and texture, GTA3's weapons are stored in a single DFF and TXD file, namely weapons.dff and generic.txd; only the selected object from the model hierarchy, e.g. pistol or Uzi is visible when the player chooses a weapon.

Type Enum Name Model
index
Model
name
Icon
0 WEAPONTYPE_UNARMED Unarmed Gta3 fist.png
1 WEAPONTYPE_BASEBALLBAT Bat 172 bat Gta3 bat.png
2 WEAPONTYPE_PISTOL Pistol 173 colt45 Gta3 pistol.png
3 WEAPONTYPE_UZI Uzi 178 uzi Gta3 uzi.png
4 WEAPONTYPE_SHOTGUN Shotgun 176 shotgun Gta3 shotgun.png
5 WEAPONTYPE_CHAINGUN AK47 171 ak47 Gta3 ak47.png
6 WEAPONTYPE_M16 M16 180 m16 Gta3 m16.png
7 WEAPONTYPE_SNIPERRIFLE Sniper Rifle 177 sniper Gta3 sniper.png
8 WEAPONTYPE_ROCKET Rocket Launcher 175 rocket Gta3 rocket.png
9 WEAPONTYPE_FLAMETHROWER Flamethrower 181 flame Gta3 flame.png
10 WEAPONTYPE_MOLOTOV Molotov Cocktail 174 molotov Gta3 molotov.png
11 WEAPONTYPE_GRENADE Grenade 170 grenade Gta3 grenade.png
12 WEAPONTYPE_DETONATOR Detonator 182 bomb Gta3 detonator.png

Vice City

Vice City is the first GTA that lets you replace a weapon of the same type. Information on melee combat is located in the melee.dat file. The textures and models of the weapons are located in the gta3.img file. The HUD icon of the fist is located in the hud.txd file.

Type Enum Name Model
index
Model
name
Icon Slot
0 WEAPONTYPE_UNARMED Unarmed VC fist.png 0
1 WEAPONTYPE_BRASSKNUCKLE Brass Knuckle 259 brassknuckle VC brassknuckle.png 0
2 WEAPONTYPE_SCREWDRIVER Screw Driver 260 screwdriver VC screwdriver.png 1
3 WEAPONTYPE_GOLFCLUB Golf Club 261 golfclub VC golfclub.png 1
4 WEAPONTYPE_NIGHTSTICK Night Stick 262 nitestick VC nitestick.png 1
5 WEAPONTYPE_KNIFE Knife 263 knifecur VC knifecur.png 1
6 WEAPONTYPE_BASEBALLBAT Baseball Bat 264 bat VC bat.png 1
7 WEAPONTYPE_HAMMER Hammer 265 hammer VC hammer.png 1
8 WEAPONTYPE_CLEAVER Cleaver 266 cleaver VC cleaver.png 1
9 WEAPONTYPE_MACHETE Machete 267 machete VC machete.png 1
10 WEAPONTYPE_KATANA Katana 268 katana VC katana.png 1
11 WEAPONTYPE_CHAINSAW Chainsaw 269 chnsaw VC chnsaw.png 1
12 WEAPONTYPE_GRENADE Grenade 270 grenade VC grenade.png 2
13 WEAPONTYPE_DETONATOR_GRENADE Remote Detonator 270
291
grenade
bomb
VC grenade.png
VC bomb.png
2
14 WEAPONTYPE_TEARGAS Tear Gas 271 teargas VC teargas.png 2
15 WEAPONTYPE_MOLOTOV Molotov 272 molotov VC molotov.png 2
16 WEAPONTYPE_ROCKET Missile 273 missile - 2
17 WEAPONTYPE_PISTOL Colt .45 (Pistol) 274 colt45 VC colt45.png 3
18 WEAPONTYPE_PYTHON Python (.357) 275 python VC python.png 3
19 WEAPONTYPE_SHOTGUN Chrome Shotgun 277 chromegun VC chromegun.png 4
20 WEAPONTYPE_SPAS12_SHOTGUN Spaz Shotgun (S.P.A.S. 12) 278 shotgspa VC shotgspa.png 4
21 WEAPONTYPE_STUBBY_SHOTGUN Stubby Shotgun 279 buddyshot VC buddyshot.png 4
22 WEAPONTYPE_TEC9 Tec-9 281 tec9 VC tec9.png 5
23 WEAPONTYPE_UZI Uzi 9mm (Uz-I) 282 uzi VC uzi.png 5
24 WEAPONTYPE_SILENCED_INGRAM Ingram Mac 10 283 ingramsl VC ingramsl.png 5
25 WEAPONTYPE_MP5 MP5 (MP) 284 mp5lng VC mp5lng.png 5
26 WEAPONTYPE_M4 M4 280 m4 VC m4.png 6
27 WEAPONTYPE_RUGER Ruger (Kruger) 276 ruger VC ruger.png 6
28 WEAPONTYPE_SNIPERRIFLE Sniper Rifle 285 sniper VC sniper.png 8
29 WEAPONTYPE_LASERSCOPE PSG-1 (.308 Sniper) 286 laser VC laser.png 8
30 WEAPONTYPE_ROCKETLAUNCHER Rocket Launcher 287 rocketla VC rocketla.png 7
31 WEAPONTYPE_FLAMETHROWER Flame Thrower 288 flame VC flame.png 7
32 WEAPONTYPE_M60 M60 289 m60 VC m60.png 7
33 WEAPONTYPE_MINIGUN Minigun 290
294
minigun
minigun2
VC minigun.png 7
34 WEAPONTYPE_DETONATOR Detonator 291 bomb VC bomb.png 9
35 WEAPONTYPE_HELICANNON HeliCanon 289 m60 - 7
36 WEAPONTYPE_CAMERA Camera 292 camera VC camera.png 9

San Andreas

San Andreas is the first GTA that lets you dual wield weapons. Information on weapons, melee combat, textures, and models are located in the same files as in Vice City.

Type Name Model
index
Model
name
Icon Slot
0 Unarmed Sa fist.png 1
1 Brass Knuckle 331 brassknuckle Sa brassknukle.png 1
2 Golf Club 333 golfclub Sa golfclub.png 2
3 Night Stick 334 nitestick Sa nitestick.png 2
4 Knife 335 knifecur Sa knifecur.png 2
5 Baseball Bat 336 bat Sa bat.png 2
6 Shovel 337 shovel Sa shovel.png 2
7 Pool Cue 338 poolcue Sa poolcue.png 2
8 Katana 339 katana Sa katana.png 2
9 Chainsaw 341 chnsaw Sa chnsaw.png 2
10 Purple Dildo 321 gun_dildo1 Sa gun dildo1.png 11
11 White Dildo 322 gun_dildo2 Sa gun dildo2.png 11
12 Long White Vibrator 323 gun_vibe1 Sa gun vibe1.png 11
13 Short White Vibrator 324 gun_vibe2 Sa gun vibe2.png 11
14 Flowers 325 flowera Sa flowera.png 11
15 Cane 326 gun_cane Sa gun cane.png 11
16 Grenade 342 grenade Sa grenade.png 9
17 Tear Gas 343 teargas Sa teargas.png 9
18 Molotov Cocktail 344 molotov Sa molotov.png 9
22 Pistol 346 colt45 Sa colt45.png 3
23 Silenced Pistol 347 silenced Sa silenced.png 3
24 Desert Eagle 348 desert_eagle Sa desert eagle.png 3
25 Shotgun 349 chromegun Sa chromegun.png 4
26 Sawnoff Shotgun 350 sawnoff Sa sawnoff.png 4
27 Combat Shotgun 351 shotgspa Sa shotgspa.png 4
28 Micro SMG 352 micro_uzi Sa micro uzi.png 5
29 SMG 353 mp5lng Sa mp5lng.png 5
30 AK47 355 ak47 Sa ak47.png 6
31 M4 356 m4 Sa m4.png 6
32 Tec9 372 tec9 Sa tec9.png 5
33 Rifle 357 cuntgun Sa cuntgun.png 7
34 Sniper Rifle 358 sniper Sa sniper.png 7
35 Rocket Launcher 359 rocketla Sa rocketla.png 8
36 Heat Seeking Rocket Launcher 360 heatseek Sa heatseek.png 8
37 Flame Thrower 361 flame Sa flame.png 8
38 Minigun 362 minigun Sa minigun.png 8
39 Satchel Charges 363 satchel Sa satchel.png 9
40 Detonator 364 bomb Sa bomb.png 13
41 Spray Paint 365 spraycan Sa spraycan.png 10
42 Fire Extinguisher 366 fire_ex Sa fire ex.png 10
43 Camera 367 camera Sa camera.png 10
44 Night-vision Goggles 368 nvgoggles Sa nvgoggles.png 12
45 Thermal Goggles 369 irgoggles Sa irgoggles.png 12
46 Parachute 371 gun_para Sa gun paraIcon.png 12

GTA IV

Main article: List of Weapons (GTA4)

See also

  • GTA III Vice City San Andreas Pickup, general pickup information including weapon pickups
  • GTA III Vice City San Andreas weapon.dat, file containing general weapon data
  • Vice City San Andreas WEAP, an IDE section for weapon definitions
  • San Andreas PICK, an IPL section for weapon pickups

External links