Weapon

From GTAMods Wiki
Revision as of 04:24, 7 July 2017 by Spaceeinstein (talk | contribs) (enums)
Jump to navigation Jump to search
This article contains information about weapons related to mission scripting. For the definition of weapons through IDE files see WEAP and for the placement using IPL see PICK.

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 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. Most of the information on the weapons are located in the weapon.dat file.

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 pistol 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 Gta3 detonator.png

Vice City

Vice City is the first GTA that lets you replace a weapon of the same type. Most of the information on the weapons are located in the weapon.dat file. 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 first 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 291 bomb VC grenade.pngVC 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 minigun VC minigun.png 7
34 WEAPONTYPE_DETONATOR Detonator VC bomb.png 9
35 WEAPONTYPE_HELICANNON HeliCanon - 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.

GTA IV

Main article: List of Weapons (GTA4)

External links