Difference between revisions of "Weapon"

From GTAMods Wiki
Jump to navigation Jump to search
m
(Vice City: icons)
Line 116: Line 116:
 
[[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 <code>[[weapon.dat]]</code> file. Information on melee combat is located in the <code>[[melee.dat]]</code> file. The textures and models of the weapons are located in the <code>[[gta3.img]]</code> file. The HUD icon of the first is located in the <code>[[hud.txd]]</code> file.
 
[[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 <code>[[weapon.dat]]</code> file. Information on melee combat is located in the <code>[[melee.dat]]</code> file. The textures and models of the weapons are located in the <code>[[gta3.img]]</code> file. The HUD icon of the first is located in the <code>[[hud.txd]]</code> file.
 
{| class="mw-collapsible mw-collapsed sortable wikitable" style="width: 41em;"
 
{| class="mw-collapsible mw-collapsed sortable wikitable" style="width: 41em;"
! Name
+
!Name ||ID ||DFF/TXD name ||Icon ||Group ||Number
! ID
 
! Model
 
! Group
 
! Number
 
 
|-
 
|-
| Unarmed
+
|Unarmed || || ||[[File:VC fist.png]] ||0 ||0
|  
 
|  
 
| 0
 
| 0
 
 
|-
 
|-
| Brass Knuckle
+
|Brass Knuckle ||259 ||brassknuckle ||[[File:VC brassknuckle.png]] ||0 ||1
| 259
 
| #brassknuckle
 
| 0
 
| 1
 
 
|-
 
|-
| Screw Driver
+
|Screw Driver ||260 ||screwdriver ||[[File:VC screwdriver.png]] ||1 ||2
| 260
 
| #screwdriver
 
| 1
 
| 2
 
 
|-
 
|-
| Golf Club
+
|Golf Club ||261 ||golfclub ||[[File:VC golfclub.png]] ||1 ||3
| 261
 
| #golfclub
 
| 1
 
| 3
 
 
|-
 
|-
| Night Stick
+
|Night Stick ||262 ||nitestick ||[[File:VC nitestick.png]] ||1 ||4
| 262
 
| #nitestick
 
| 1
 
| 4
 
 
|-
 
|-
| Knife
+
|Knife ||263 ||knifecur ||[[File:VC knifecur.png]] ||1 ||5
| 263
 
| #knifecur
 
| 1
 
| 5
 
 
|-
 
|-
| Baseball Bat
+
|Baseball Bat ||264 ||bat ||[[File:VC bat.png]] ||1 ||6
| 264
 
| #bat
 
| 1
 
| 6
 
 
|-
 
|-
| Hammer
+
|Hammer ||265 ||hammer ||[[File:VC hammer.png]] ||1 ||7
| 265
 
| #hammer
 
| 1
 
| 7
 
 
|-
 
|-
| Cleaver
+
|Cleaver ||266 ||cleaver ||[[File:VC cleaver.png]] ||1 ||8
| 266
 
| #cleaver
 
| 1
 
| 8
 
 
|-
 
|-
| Machete
+
|Machete ||267 ||machete ||[[File:VC machete.png]] ||1 ||9
| 267
 
| #machete
 
| 1
 
| 9
 
 
|-
 
|-
| Katana
+
|Katana ||268 ||katana ||[[File:VC katana.png]] ||1 ||10
| 268
 
| #katana
 
| 1
 
| 10
 
 
|-
 
|-
| Chainsaw
+
|Chainsaw ||269 ||chnsaw ||[[File:VC chnsaw.png]] ||1 ||11
| 269
 
| #chnsaw
 
| 1
 
| 11
 
 
|-
 
|-
| Grenade
+
|Grenade ||270 ||grenade ||[[File:VC grenade.png]] ||2 ||12
| 270
 
| #grenade
 
| 2
 
| 12
 
 
|-
 
|-
| Remote Detonator
+
|Remote Detonator ||291 ||bomb ||[[File:VC grenade.png|32px]][[File:VC bomb.png|32px]] ||2 ||13
| 291
 
| #bomb
 
| 2
 
| 13
 
 
|-
 
|-
| Tear Gas
+
|Tear Gas ||271 ||teargas ||[[File:VC teargas.png]] ||2 ||14
| 271
 
| #teargas
 
| 2
 
| 14
 
 
|-
 
|-
| Molotov
+
|Molotov ||272 ||molotov ||[[File:VC molotov.png]] ||2 ||15
| 272
 
| #molotov
 
| 2
 
| 15
 
 
|-
 
|-
| Missile
+
|Missile ||273 ||missile || - ||2 ||16
| 273
 
| #missile
 
| 2
 
| 16
 
 
|-
 
|-
| Colt .45 (Pistol)
+
|Colt .45 (Pistol) ||274 ||colt45 ||[[File:VC colt45.png]] ||3 ||17
| 274
 
| #colt45
 
| 3
 
| 17
 
 
|-
 
|-
| Python (.357)
+
|Python (.357) ||275 ||python ||[[File:VC python.png]] ||3 ||18
| 275
 
| #python
 
| 3
 
| 18
 
 
|-
 
|-
| Chrome Shotgun
+
|Chrome Shotgun ||277 ||chromegun ||[[File:VC chromegun.png]] ||4 ||19
| 277
 
| #chromegun
 
| 4
 
| 19
 
 
|-
 
|-
| Spaz Shotgun (S.P.A.S. 12)
+
|Spaz Shotgun (S.P.A.S. 12) ||278 ||shotgspa ||[[File:VC shotgspa.png]] ||4 ||20
| 278
 
| #shotgspa
 
| 4
 
| 20
 
 
|-
 
|-
| Stubby Shotgun
+
|Stubby Shotgun ||279 ||buddyshot ||[[File:VC buddyshot.png]] ||4 ||21
| 279
 
| #buddyshot
 
| 4
 
| 21
 
 
|-
 
|-
| Tec-9
+
|Tec-9 ||281 ||tec9 ||[[File:VC tec9.png]] ||5 ||22
| 281
 
| #tec9
 
| 5
 
| 22
 
 
|-
 
|-
| Uzi 9mm (Uz-I)
+
|Uzi 9mm (Uz-I) ||282 ||uzi ||[[File:VC uzi.png]] ||5 ||23
| 282
 
| #uzi
 
| 5
 
| 23
 
 
|-
 
|-
| Ingram Mac 10
+
|Ingram Mac 10 ||283 ||ingramsl ||[[File:VC ingramsl.png]] ||5 ||24
| 283
 
| #ingramsl
 
| 5
 
| 24
 
 
|-
 
|-
| MP5 (MP)
+
|MP5 (MP) ||284 ||mp5lng ||[[File:VC mp5lng.png]] ||5 ||25
| 284
 
| #mp5lng
 
| 5
 
| 25
 
 
|-
 
|-
| M4
+
|M4 ||280 ||m4 ||[[File:VC m4.png]] ||6 ||26
| 280
 
| #m4
 
| 6
 
| 26
 
 
|-
 
|-
| Ruger (Kruger)
+
|Ruger (Kruger) ||276 ||ruger ||[[File:VC ruger.png]] ||6 ||27
| 276
 
| #ruger
 
| 6
 
| 27
 
 
|-
 
|-
| Sniper Rifle
+
|Sniper Rifle ||285 ||sniper ||[[File:VC sniper.png]] ||8 ||28
| 285
 
| #sniper
 
| 8
 
| 28
 
 
|-
 
|-
| PSG-1 (.308 Sniper)
+
|PSG-1 (.308 Sniper) ||286 ||laser ||[[File:VC laser.png]] ||8 ||29
| 286
 
| #laser
 
| 8
 
| 29
 
 
|-
 
|-
| Rocket Launcher
+
|Rocket Launcher ||287 ||rocketla ||[[File:VC rocketla.png]] ||7 ||30
| 287
 
| #rocketla
 
| 7
 
| 30
 
 
|-
 
|-
| Flame Thrower
+
|Flame Thrower ||288 ||flame ||[[File:VC flame.png]] ||7 ||31
| 288
 
| #flame
 
| 7
 
| 31
 
 
|-
 
|-
| M60
+
|M60 ||289 ||m60 ||[[File:VC m60.png]] ||7 ||32
| 289
 
| #m60
 
| 7
 
| 32
 
 
|-
 
|-
| Minigun
+
|Minigun ||290 ||minigun ||[[File:VC minigun.png]] ||7 ||33
| 290
 
| #minigun
 
| 7
 
| 33
 
 
|-
 
|-
| Detonator
+
|Detonator || || ||[[File:VC bomb.png]] ||9 ||34
|  
 
|  
 
| 9
 
| 34
 
 
|-
 
|-
| HeliCanon
+
|HeliCanon || || || - ||7 ||35
|  
 
|  
 
| 7
 
| 35
 
 
|-
 
|-
| Camera
+
|Camera ||292 ||camera ||[[File:VC camera.png]] ||9 ||36
| 292
 
| #camera
 
| 9
 
| 36
 
 
|}
 
|}
  

Revision as of 15:54, 6 March 2015

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

The following opcodes is related to weapons. Some of the opcodes are specific to one game so click on the opcode to see more information about it, if it exists.

  • 0114, sets an actor's weapon ammo while in a vehicle
  • 017B, sets an actor's weapon ammo
  • 01B2, gives an actor a weapon
  • 01B9, sets an actor's currently armed weapon
  • 0237, sets a gang's weapons
  • 02D6, checks if a weapon is being fired in a location
  • 02D8, checks the current weapon an actor is holding
  • 02E2, sets an actor's weapon accuracy
  • 031D, checks if an actor is hit by a weapon
  • 031E, checks if a vehicle is hit by a weapon
  • 032B, creates a pickup with ammo info – usually used for weapons
  • 041A, gets the current amount of ammo for the weapon
  • 0467, resets 031D
  • 0468, resets 031E
  • 0470, gets an actor's current weapon
  • 048F, removes weapons from an actor
  • 0491, checks if an actor has the weapon
  • 04B8, gets the weapon's data from an actor
  • 0501, sets the player's ability to drive by
  • 0555, removes a specific weapon from an actor
  • 0563, sets the player's drive by ammo
  • 06AB, hides all weapons
  • 0713, makes an actor do drive bys
  • 081A, sets an actor's weapon skill
  • 087E, sets an actor to drop weapons after a death
  • 0881, sets an actor be able to shoot
  • 0946, sets an actor oblivious to weapon fire
  • 0992, 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.

Name ID Model Number
Bat 172 #bat 1
Pistol 173 #pistol 2
Uzi 178 #uzi 3
Shotgun 176 #shotgun 4
AK47 171 #ak47 5
M16 180 #m16 6
Sniper Rifle 177 #sniper 7
Rocket Launcher 175 #rocket 8
Flamethrower 181 #flame 9
Molotov Cocktail 174 #molotov 10
Grenade 170 #grenade 11
Detonator 12

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.

Name ID DFF/TXD name Icon Group Number
Unarmed VC fist.png 0 0
Brass Knuckle 259 brassknuckle VC brassknuckle.png 0 1
Screw Driver 260 screwdriver VC screwdriver.png 1 2
Golf Club 261 golfclub VC golfclub.png 1 3
Night Stick 262 nitestick VC nitestick.png 1 4
Knife 263 knifecur VC knifecur.png 1 5
Baseball Bat 264 bat VC bat.png 1 6
Hammer 265 hammer VC hammer.png 1 7
Cleaver 266 cleaver VC cleaver.png 1 8
Machete 267 machete VC machete.png 1 9
Katana 268 katana VC katana.png 1 10
Chainsaw 269 chnsaw VC chnsaw.png 1 11
Grenade 270 grenade VC grenade.png 2 12
Remote Detonator 291 bomb VC grenade.pngVC bomb.png 2 13
Tear Gas 271 teargas VC teargas.png 2 14
Molotov 272 molotov VC molotov.png 2 15
Missile 273 missile - 2 16
Colt .45 (Pistol) 274 colt45 VC colt45.png 3 17
Python (.357) 275 python VC python.png 3 18
Chrome Shotgun 277 chromegun VC chromegun.png 4 19
Spaz Shotgun (S.P.A.S. 12) 278 shotgspa VC shotgspa.png 4 20
Stubby Shotgun 279 buddyshot VC buddyshot.png 4 21
Tec-9 281 tec9 VC tec9.png 5 22
Uzi 9mm (Uz-I) 282 uzi VC uzi.png 5 23
Ingram Mac 10 283 ingramsl VC ingramsl.png 5 24
MP5 (MP) 284 mp5lng VC mp5lng.png 5 25
M4 280 m4 VC m4.png 6 26
Ruger (Kruger) 276 ruger VC ruger.png 6 27
Sniper Rifle 285 sniper VC sniper.png 8 28
PSG-1 (.308 Sniper) 286 laser VC laser.png 8 29
Rocket Launcher 287 rocketla VC rocketla.png 7 30
Flame Thrower 288 flame VC flame.png 7 31
M60 289 m60 VC m60.png 7 32
Minigun 290 minigun VC minigun.png 7 33
Detonator VC bomb.png 9 34
HeliCanon - 7 35
Camera 292 camera VC camera.png 9 36

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.

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

GTA IV

Main article: List of Weapons (GTA4)

External links