Difference between revisions of "Weapon"
WastedHymn (talk | contribs) (→External links) |
|||
(22 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | + | 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''. | |
− | A '''weapon''' is anything that can damage other objects, including vehicles and pedestrians. It is one of the core gameplay | ||
− | == Mission | + | == Mission script == |
− | + | === Opcodes === | |
− | [[ | + | {|class="nowrap-col-2" |
− | [[017B]] | + | |[[0113]] ||{{Icon|3}} ||adds ammo to the player's weapon |
− | [[01B2]] - | + | |- |
− | [[01B9]] - | + | |[[0114]] ||{{Icon|t}} ||adds ammo to the character's weapon |
− | [[0237]] | + | |- |
− | [[ | + | |[[017A]] ||{{Icon|3}} {{Icon|VC}} ||sets the player's weapon ammo |
− | [[02D8]] | + | |- |
− | [[02E2]] | + | |[[017B]] ||{{Icon|3}} {{Icon|SA}} ||sets the character's weapon ammo |
− | [[031D]] | + | |- |
− | [[031E]] | + | |[[01B1]] ||{{Icon|3}} {{Icon|VC}} ||gives the weapon to the player |
− | [[032B]] - | + | |- |
− | [[041A]] | + | |[[01B2]] ||{{Icon|t}} ||gives the weapon to the character |
− | [[0467]] - | + | |- |
− | [[0468]] - | + | |[[01B8]] ||{{Icon|3}} {{Icon|VC}} ||sets the current weapon of the player |
− | [[0470]] | + | |- |
− | [[048F]] - | + | |[[01B9]] ||{{Icon|t}} ||sets the current weapon of the character |
− | [[0491]] | + | |- |
− | [[04B8]] | + | |[[0213]] ||{{Icon|t}} ||creates a [[pickup]] with predefined ammo |
− | [[0501]] | + | |- |
− | [[0555]] | + | |[[0237]] ||{{Icon|t}} ||sets the gang's weapons |
− | [[0563]] | + | |- |
− | [[06AB]] | + | |[[02D7]] ||{{Icon|3}} {{Icon|VC}} ||checks the current weapon of the player |
− | [[0713]] | + | |- |
− | [[081A]] | + | |[[02D8]] ||{{Icon|t}} ||checks the current weapon of the character |
− | [[087E]] | + | |- |
− | [[0881]] | + | |[[02E2]] ||{{Icon|t}} ||sets the character's weapon accuracy |
− | [[0946]] | + | |- |
− | [[0992]] | + | |[[031D]] ||{{Icon|t}} ||checks if the character is damaged by the weapon |
+ | |- | ||
+ | |[[031E]] ||{{Icon|t}} ||checks if the vehicle is damaged by the weapon | ||
+ | |- | ||
+ | |[[032B]] ||{{Icon|t}} ||creates a pickup with ammo | ||
+ | |- | ||
+ | |[[0419]] ||{{Icon|3}} {{Icon|VC}} ||gets the ammo of the player's weapon | ||
+ | |- | ||
+ | |[[041A]] ||{{Icon|3}} ||gets the ammo of the character's weapon | ||
+ | |- | ||
+ | |[[0467]] ||{{Icon|t}} ||clears the character's last weapon damage | ||
+ | |- | ||
+ | |[[0468]] ||{{Icon|t}} ||clears the vehicle's last weapon damage | ||
+ | |- | ||
+ | |[[046F]] ||{{Icon|3}} {{Icon|VC}} ||gets the player's current weapon | ||
+ | |- | ||
+ | |[[0470]] ||{{Icon|t}} ||gets the character's current weapon | ||
+ | |- | ||
+ | |[[048F]] ||{{a|r}} |{{Icon|VC}} {{Icon|SA}} ||removes all of the character's weapons | ||
+ | |- | ||
+ | |[[0490]] ||{{a|c}} |{{Icon|VC}} ||checks if the player has the weapon | ||
+ | |- | ||
+ | |[[0491]] ||{{a|r}} |{{Icon|SA}} ||checks if the character has the weapon | ||
+ | |- | ||
+ | |[[04B8]] ||{{a|r}} |{{Icon|VC}} {{Icon|SA}} ||gets the character's weapon data | ||
+ | |- | ||
+ | |[[0501]] ||{{a|r}} |{{Icon|VC}} {{Icon|SA}} ||sets player can do drive by | ||
+ | |- | ||
+ | |[[0555]] ||{{a|r}} |{{Icon|SA}} ||removes the weapon from the character | ||
+ | |- | ||
+ | |[[0563]] ||{{a|r}} |{{Icon|VC}} {{Icon|SA}} ||ensures player has a drive-by weapon | ||
+ | |- | ||
+ | |[[06AB]] ||{{a|r}} |{{Icon|SA}} ||hides all weapons | ||
+ | |- | ||
+ | |[[0713]] ||{{a|r}} |{{Icon|SA}} ||makes the character do drive bys | ||
+ | |- | ||
+ | |[[081A]] ||{{a|r}} |{{Icon|SA}} ||sets the character's weapon skill | ||
+ | |- | ||
+ | |[[087E]] ||{{a|r}} |{{Icon|SA}} ||sets the character to drop weapons after a death | ||
+ | |- | ||
+ | |[[0881]] ||{{a|r}} |{{Icon|SA}} ||sets the character be able to shoot | ||
+ | |- | ||
+ | |[[0946]] ||{{a|r}} |{{Icon|SA}} ||sets the character oblivious to weapon fire | ||
+ | |- | ||
+ | |[[0992]] ||{{a|r}} |{{Icon|SA}} ||sets the player's ability to scroll through weapons | ||
+ | |} | ||
=== [[Native function]]s === | === [[Native function]]s === | ||
Line 42: | Line 86: | ||
{{Incomplete}} | {{Incomplete}} | ||
− | == Lists of | + | == Lists of weapons == |
− | === | + | === GTA 2 === |
− | + | {|class="mw-collapsible sortable mw-collapsed wikitable center-col-1" | |
+ | !Type ||Enum ||Name ||Icon | ||
+ | |- | ||
+ | |0 ||PISTOL ||Pistol ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 pistol.png|Pistol]] | ||
+ | |- | ||
+ | |1 ||MACHINE_<wbr>GUN ||S-Uzi Machine Gun ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 machinegun.png|S-Uzi Machine Gun]] | ||
+ | |- | ||
+ | |2 ||ROCKET_<wbr>LAUNCHER ||Rocket Launcher ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 rocketlauncher.png|Rocket Launcher]] | ||
+ | |- | ||
+ | |3 ||ELECTRO_<wbr>GUN ||ElectroGun ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 electrogun.png|ElectroGun]] | ||
+ | |- | ||
+ | |4 ||MOLOTOV ||Molotov Cocktails ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 molotov.png|Molotov Cocktails]] | ||
+ | |- | ||
+ | |5 ||GRENADE ||Grenades ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 grenade.png|Grenades]] | ||
+ | |- | ||
+ | |6 ||SHOTGUN ||Shotgun ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 shotgun.png|Shotgun]] | ||
+ | |- | ||
+ | |7 ||ELECTRO_<wbr>BATON ||ElectroBaton ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 electrobaton.png|ElectroBaton]] | ||
+ | |- | ||
+ | |8 ||FLAME_<wbr>THROWER ||Flamethrower ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 flamethrower.png|Flamethrower]] | ||
+ | |- | ||
+ | |9 ||SILENCED_<wbr>MACHINE_<wbr>GUN ||Silenced S-Uzi Machine Gun ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 silencedmachinegun.png|Silenced S-Uzi Machine Gun]] | ||
+ | |- | ||
+ | |10 ||DUAL_<wbr>PISTOL ||Dual Pistol ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 dualpistol.png|Dual Pistol]] | ||
+ | |- | ||
+ | |11 ||WEAPON_<wbr>11 ||na ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 weapon11.png]] | ||
+ | |- | ||
+ | |12 ||WEAPON_<wbr>12 ||na ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 weapon12.png]] | ||
+ | |- | ||
+ | |13 ||WEAPON_<wbr>13 ||na ||style="height: 44px; text-align: right; vertical-align: top;" |[[File:Gta2 weapon13.png]] | ||
+ | |- | ||
+ | |14 ||WEAPON_<wbr>14 ||na ||style="height: 44px; text-align: right; vertical-align: top;" |[[File: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 <code>weapons.dff</code> and <code>generic.txd</code>; only the selected object from the model hierarchy, e.g. pistol or Uzi is visible when the player chooses a weapon. | ||
+ | {|class="mw-collapsible sortable mw-collapsed wikitable center-col-1" | ||
+ | !Type ||Enum ||Name ||Model<br>index ||Model<br>name ||Icon | ||
+ | |- | ||
+ | |0 ||WEAPONTYPE_<wbr>UNARMED ||Unarmed ||||||[[File:gta3_fist.png]] | ||
+ | |- | ||
+ | |1 ||WEAPONTYPE_<wbr>BASEBALLBAT ||Bat ||172 ||bat ||[[File:gta3_bat.png]] | ||
+ | |- | ||
+ | |2 ||WEAPONTYPE_<wbr>PISTOL ||Pistol ||173 ||colt45 ||[[File:gta3_pistol.png]] | ||
+ | |- | ||
+ | |3 ||WEAPONTYPE_<wbr>UZI ||Uzi ||178 ||uzi ||[[File:gta3_uzi.png]] | ||
+ | |- | ||
+ | |4 ||WEAPONTYPE_<wbr>SHOTGUN ||Shotgun ||176 ||shotgun ||[[File:gta3_shotgun.png]] | ||
+ | |- | ||
+ | |5 ||WEAPONTYPE_<wbr>CHAINGUN ||AK47 ||171 ||ak47 ||[[File:gta3_ak47.png]] | ||
+ | |- | ||
+ | |6 ||WEAPONTYPE_<wbr>M16 ||M16 ||180 ||m16 ||[[File:gta3_m16.png]] | ||
+ | |- | ||
+ | |7 ||WEAPONTYPE_<wbr>SNIPERRIFLE ||Sniper Rifle ||177 ||sniper ||[[File:gta3_sniper.png]] | ||
+ | |- | ||
+ | |8 ||WEAPONTYPE_<wbr>ROCKET ||Rocket Launcher ||175 ||rocket ||[[File:gta3_rocket.png]] | ||
+ | |- | ||
+ | |9 ||WEAPONTYPE_<wbr>FLAMETHROWER ||Flamethrower ||181 ||flame ||[[File:gta3_flame.png]] | ||
+ | |- | ||
+ | |10 ||WEAPONTYPE_<wbr>MOLOTOV ||Molotov Cocktail ||174 ||molotov ||[[File:gta3_molotov.png]] | ||
+ | |- | ||
+ | |11 ||WEAPONTYPE_<wbr>GRENADE ||Grenade ||170 ||grenade ||[[File:gta3_grenade.png]] | ||
+ | |- | ||
+ | |12 ||WEAPONTYPE_<wbr>DETONATOR ||Detonator ||182 ||bomb ||[[File:gta3_detonator.png]] | ||
+ | |} | ||
=== Vice City === | === Vice City === | ||
− | [[Vice City]] is the first GTA that lets you replace a weapon of the same type | + | [[Vice City]] is the first GTA that lets you replace a weapon of the same type. 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 fist is located in the <code>[[hud.txd]]</code> file. |
− | {| | + | {|class="mw-collapsible sortable mw-collapsed wikitable center-col-1" |
− | ! Name | + | !Type ||[[SCM language III/VC definitions#WEAPONTYPE|Enum]] ||Name ||Model<br>index ||Model<br>name ||Icon ||Slot |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | Unarmed | + | |0 ||WEAPONTYPE_<wbr>UNARMED ||Unarmed || || ||[[File:VC fist.png]] ||0 |
− | | | ||
− | | | ||
− | | | ||
− | | 0 | ||
|- | |- | ||
− | | Brass Knuckle | + | |1 ||WEAPONTYPE_<wbr>BRASSKNUCKLE ||Brass Knuckle ||259 ||brassknuckle ||[[File:VC brassknuckle.png]] ||0 |
− | | 259 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Screw Driver | + | |2 ||WEAPONTYPE_<wbr>SCREWDRIVER ||Screw Driver ||260 ||screwdriver ||[[File:VC screwdriver.png]] ||1 |
− | | 260 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Golf Club | + | |3 ||WEAPONTYPE_<wbr>GOLFCLUB ||Golf Club ||261 ||golfclub ||[[File:VC golfclub.png]] ||1 |
− | | 261 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Night Stick | + | |4 ||WEAPONTYPE_<wbr>NIGHTSTICK ||Night Stick ||262 ||nitestick ||[[File:VC nitestick.png]] ||1 |
− | | 262 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Knife | + | |5 ||WEAPONTYPE_<wbr>KNIFE ||Knife ||263 ||knifecur ||[[File:VC knifecur.png]] ||1 |
− | | 263 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Baseball Bat | + | |6 ||WEAPONTYPE_<wbr>BASEBALLBAT ||Baseball Bat ||264 ||bat ||[[File:VC bat.png]] ||1 |
− | | 264 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Hammer | + | |7 ||WEAPONTYPE_<wbr>HAMMER ||Hammer ||265 ||hammer ||[[File:VC hammer.png]] ||1 |
− | | 265 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Cleaver | + | |8 ||WEAPONTYPE_<wbr>CLEAVER ||Cleaver ||266 ||cleaver ||[[File:VC cleaver.png]] ||1 |
− | | 266 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Machete | + | |9 ||WEAPONTYPE_<wbr>MACHETE ||Machete ||267 ||machete ||[[File:VC machete.png]] ||1 |
− | | 267 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Katana | + | |10 ||WEAPONTYPE_<wbr>KATANA ||Katana ||268 ||katana ||[[File:VC katana.png]] ||1 |
− | | 268 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Chainsaw | + | |11 ||WEAPONTYPE_<wbr>CHAINSAW ||Chainsaw ||269 ||chnsaw ||[[File:VC chnsaw.png]] ||1 |
− | | 269 | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | Grenade | + | |12 ||WEAPONTYPE_<wbr>GRENADE ||Grenade ||270 ||grenade ||[[File:VC grenade.png]] ||2 |
− | | 270 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Remote Detonator | + | |13 ||WEAPONTYPE_<wbr>DETONATOR_GRENADE ||Remote Detonator ||270<br>291 ||grenade<br>bomb ||[[File:VC grenade.png]]<br>[[File:VC bomb.png]] ||2 |
− | | 291 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Tear Gas | + | |14 ||WEAPONTYPE_<wbr>TEARGAS ||Tear Gas ||271 ||teargas ||[[File:VC teargas.png]] ||2 |
− | | 271 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Molotov | + | |15 ||WEAPONTYPE_<wbr>MOLOTOV ||Molotov ||272 ||molotov ||[[File:VC molotov.png]] ||2 |
− | | 272 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Missile | + | |16 ||WEAPONTYPE_<wbr>ROCKET ||Missile ||273 ||missile ||style="height: 64px;" |- ||2 |
− | | 273 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Colt .45 (Pistol) | + | |17 ||WEAPONTYPE_<wbr>PISTOL ||Colt .45 (Pistol) ||274 ||colt45 ||[[File:VC colt45.png]] ||3 |
− | | 274 | ||
− | | | ||
− | | 3 | ||
− | |||
|- | |- | ||
− | | Python (.357) | + | |18 ||WEAPONTYPE_<wbr>PYTHON ||Python (.357) ||275 ||python ||[[File:VC python.png]] ||3 |
− | | 275 | ||
− | | | ||
− | | 3 | ||
− | |||
|- | |- | ||
− | | Chrome Shotgun | + | |19 ||WEAPONTYPE_<wbr>SHOTGUN ||Chrome Shotgun ||277 ||chromegun ||[[File:VC chromegun.png]] ||4 |
− | | | ||
− | | | ||
− | | 4 | ||
− | |||
|- | |- | ||
− | | Spaz Shotgun (S.P.A.S. 12) | + | |20 ||WEAPONTYPE_<wbr>SPAS12_SHOTGUN ||Spaz Shotgun (S.P.A.S. 12) ||278 ||shotgspa ||[[File:VC shotgspa.png]] ||4 |
− | | | ||
− | | | ||
− | | 4 | ||
− | |||
|- | |- | ||
− | | Stubby Shotgun | + | |21 ||WEAPONTYPE_<wbr>STUBBY_SHOTGUN ||Stubby Shotgun ||279 ||buddyshot ||[[File:VC buddyshot.png]] ||4 |
− | | | ||
− | | | ||
− | | 4 | ||
− | |||
|- | |- | ||
− | | Tec-9 | + | |22 ||WEAPONTYPE_<wbr>TEC9 ||Tec-9 ||281 ||tec9 ||[[File:VC tec9.png]] ||5 |
− | | 281 | ||
− | | | ||
− | | 5 | ||
− | |||
|- | |- | ||
− | | Uzi 9mm (Uz-I) | + | |23 ||WEAPONTYPE_<wbr>UZI ||Uzi 9mm (Uz-I) ||282 ||uzi ||[[File:VC uzi.png]] ||5 |
− | | 282 | ||
− | | | ||
− | | 5 | ||
− | |||
|- | |- | ||
− | | Ingram Mac 10 | + | |24 ||WEAPONTYPE_<wbr>SILENCED_INGRAM ||Ingram Mac 10 ||283 ||ingramsl ||[[File:VC ingramsl.png]] ||5 |
− | | 283 | ||
− | | | ||
− | | 5 | ||
− | |||
|- | |- | ||
− | | MP5 (MP) | + | |25 ||WEAPONTYPE_<wbr>MP5 ||MP5 (MP) ||284 ||mp5lng ||[[File:VC mp5lng.png]] ||5 |
− | | 284 | ||
− | | | ||
− | | 5 | ||
− | |||
|- | |- | ||
− | | M4 | + | |26 ||WEAPONTYPE_<wbr>M4 ||M4 ||280 ||m4 ||[[File:VC m4.png]] ||6 |
− | | 280 | ||
− | | | ||
− | | 6 | ||
− | |||
|- | |- | ||
− | | Ruger (Kruger) | + | |27 ||WEAPONTYPE_<wbr>RUGER ||Ruger (Kruger) ||276 ||ruger ||[[File:VC ruger.png]] ||6 |
− | | 276 | ||
− | | | ||
− | | 6 | ||
− | |||
|- | |- | ||
− | | | + | |28 ||WEAPONTYPE_<wbr>SNIPERRIFLE ||Sniper Rifle ||285 ||sniper ||[[File:VC sniper.png]] ||8 |
− | | | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | | + | |29 ||WEAPONTYPE_<wbr>LASERSCOPE ||PSG-1 (.308 Sniper) ||286 ||laser ||[[File:VC laser.png]] ||8 |
− | | | ||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | M60 | + | |30 ||WEAPONTYPE_<wbr>ROCKETLAUNCHER ||Rocket Launcher ||287 ||rocketla ||[[File:VC rocketla.png]] ||7 |
− | | | + | |- |
− | | | + | |31 ||WEAPONTYPE_<wbr>FLAMETHROWER ||Flame Thrower ||288 ||flame ||[[File:VC flame.png]] ||7 |
− | | 7 | + | |- |
− | | | + | |32 ||WEAPONTYPE_<wbr>M60 ||M60 ||289 ||m60 ||[[File:VC m60.png]] ||7 |
+ | |- | ||
+ | |33 ||WEAPONTYPE_<wbr>MINIGUN ||Minigun ||290<br>294 ||minigun<br>minigun2 ||[[File:VC minigun.png]] ||7 | ||
+ | |- | ||
+ | |34 ||WEAPONTYPE_<wbr>DETONATOR ||Detonator ||291 ||bomb ||[[File:VC bomb.png]] ||9 | ||
+ | |- | ||
+ | |35 ||WEAPONTYPE_<wbr>HELICANNON ||HeliCanon ||289 ||m60 ||style="height: 64px;" |- ||7 | ||
+ | |- | ||
+ | |36 ||WEAPONTYPE_<wbr>CAMERA ||Camera ||292 ||camera ||[[File:VC camera.png]] ||9 | ||
|} | |} | ||
+ | |||
=== San Andreas === | === 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. | [[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. | ||
− | {| | + | {|class="mw-collapsible sortable mw-collapsed wikitable center-col-1" |
− | ! Name | + | !Type ||Name ||Model<br>index ||Model<br>name ||Icon ||Slot |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | Unarmed | + | |0 ||Unarmed ||||||[[File:Sa fist.png]] ||1 |
− | | | ||
− | | | ||
− | | 1 | ||
− | |||
|- | |- | ||
− | | Brass Knuckle | + | |1 ||Brass Knuckle ||331 ||brassknuckle ||[[File:Sa brassknukle.png]] ||1 |
− | | 331 | ||
− | | | ||
− | | | ||
− | | 1 | ||
|- | |- | ||
− | | Golf Club | + | |2 ||Golf Club ||333 ||golfclub ||[[File:Sa golfclub.png]] ||2 |
− | | 333 | ||
− | | | ||
− | | | ||
− | | 2 | ||
|- | |- | ||
− | | Night Stick | + | |3 ||Night Stick ||334 ||nitestick ||[[File:Sa nitestick.png]] ||2 |
− | | 334 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Knife | + | |4 ||Knife ||335 ||knifecur ||[[File:Sa knifecur.png]] ||2 |
− | | 335 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Baseball Bat | + | |5 ||Baseball Bat ||336 ||bat ||[[File:Sa bat.png]] ||2 |
− | | 336 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Shovel | + | |6 ||Shovel ||337 ||shovel ||[[File:Sa shovel.png]] ||2 |
− | | 337 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Pool Cue | + | |7 ||Pool Cue ||338 ||poolcue ||[[File:Sa poolcue.png]] ||2 |
− | | 338 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Katana | + | |8 ||Katana ||339 ||katana ||[[File:Sa katana.png]] ||2 |
− | | 339 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Chainsaw | + | |9 ||Chainsaw ||341 ||chnsaw ||[[File:Sa chnsaw.png]] ||2 |
− | | 341 | ||
− | | | ||
− | | 2 | ||
− | |||
|- | |- | ||
− | | Purple Dildo | + | |10 ||Purple Dildo ||321 ||gun_dildo1 ||[[File:Sa gun dildo1.png]] ||11 |
− | | 321 | ||
− | | | ||
− | | 11 | ||
− | |||
|- | |- | ||
− | | White Dildo | + | |11 ||White Dildo ||322 ||gun_dildo2 ||[[File:Sa gun dildo2.png]] ||11 |
− | | 322 | ||
− | | | ||
− | | | ||
− | | 11 | ||
|- | |- | ||
− | | Long White Vibrator | + | |12 ||Long White Vibrator ||323 ||gun_vibe1 ||[[File:Sa gun vibe1.png]] ||11 |
− | | 323 | ||
− | | | ||
− | | 11 | ||
− | |||
|- | |- | ||
− | | Short White Vibrator | + | |13 ||Short White Vibrator ||324 ||gun_vibe2 ||[[File:Sa gun vibe2.png]] ||11 |
− | | 324 | ||
− | | | ||
− | | 11 | ||
− | |||
|- | |- | ||
− | | Flowers | + | |14 ||Flowers ||325 ||flowera ||[[File:Sa flowera.png]] ||11 |
− | | 325 | ||
− | | | ||
− | | 11 | ||
− | |||
|- | |- | ||
− | | Cane | + | |15 ||Cane ||326 ||gun_cane ||[[File:Sa gun_cane.png]] ||11 |
− | | 326 | ||
− | | | ||
− | | 11 | ||
− | |||
|- | |- | ||
− | | Grenade | + | |16 ||Grenade ||342 ||grenade ||[[File:Sa grenade.png]] ||9 |
− | | 342 | ||
− | | | ||
− | | 9 | ||
− | |||
|- | |- | ||
− | | Tear Gas | + | |17 ||Tear Gas ||343 ||teargas ||[[File:Sa teargas.png]] ||9 |
− | | 343 | ||
− | | | ||
− | | 9 | ||
− | |||
|- | |- | ||
− | | Molotov Cocktail | + | |18 ||Molotov Cocktail ||344 ||molotov ||[[File:Sa molotov.png]] ||9 |
− | | 344 | ||
− | | | ||
− | | 9 | ||
− | |||
|- | |- | ||
− | | Pistol | + | |22 ||Pistol ||346 ||colt45 ||[[File:Sa colt45.png]] ||3 |
− | | 346 | ||
− | | | ||
− | | 3 | ||
− | |||
|- | |- | ||
− | | Silenced Pistol | + | |23 ||Silenced Pistol ||347 ||silenced ||[[File:Sa silenced.png]] ||3 |
− | | 347 | ||
− | | | ||
− | | 3 | ||
− | |||
|- | |- | ||
− | | Desert Eagle | + | |24 ||Desert Eagle ||348 ||desert_eagle ||[[File:Sa desert eagle.png]] ||3 |
− | | 348 | ||
− | | | ||
− | | 3 | ||
− | |||
|- | |- | ||
− | | Shotgun | + | |25 ||Shotgun ||349 ||chromegun ||[[File:Sa chromegun.png]] ||4 |
− | | 349 | ||
− | | | ||
− | | 4 | ||
− | |||
|- | |- | ||
− | | Sawnoff Shotgun | + | |26 ||Sawnoff Shotgun ||350 ||sawnoff ||[[File:Sa sawnoff.png]] ||4 |
− | | 350 | ||
− | | | ||
− | | 4 | ||
− | |||
|- | |- | ||
− | | Combat Shotgun | + | |27 ||Combat Shotgun ||351 ||shotgspa ||[[File:Sa shotgspa.png]] ||4 |
− | | 351 | ||
− | | | ||
− | | 4 | ||
− | |||
|- | |- | ||
− | | Micro SMG | + | |28 ||Micro SMG ||352 ||micro_uzi ||[[File:Sa micro uzi.png]] ||5 |
− | | 352 | ||
− | | | ||
− | | 5 | ||
− | |||
|- | |- | ||
− | | SMG | + | |29 ||SMG ||353 ||mp5lng ||[[File:Sa mp5lng.png]] ||5 |
− | | 353 | ||
− | | | ||
− | | 5 | ||
− | |||
|- | |- | ||
− | | AK47 | + | |30 ||AK47 ||355 ||ak47 ||[[File:Sa ak47.png]] ||6 |
− | | 355 | ||
− | | | ||
− | | 6 | ||
− | |||
|- | |- | ||
− | | M4 | + | |31 ||M4 ||356 ||m4 ||[[File:Sa m4.png]] ||6 |
− | | 356 | ||
− | | | ||
− | | 6 | ||
− | |||
|- | |- | ||
− | | Tec9 | + | |32 ||Tec9 ||372 ||tec9 ||[[File:Sa tec9.png]] ||5 |
− | | 372 | ||
− | | | ||
− | | 5 | ||
− | |||
|- | |- | ||
− | | Rifle | + | |33 ||Rifle ||357 ||cuntgun ||[[File:Sa cuntgun.png]] ||7 |
− | | 357 | ||
− | | | ||
− | | 7 | ||
− | |||
|- | |- | ||
− | | Sniper Rifle | + | |34 ||Sniper Rifle ||358 ||sniper ||[[File:Sa sniper.png]] ||7 |
− | | 358 | ||
− | | | ||
− | | 7 | ||
− | |||
|- | |- | ||
− | | Rocket Launcher | + | |35 ||Rocket Launcher ||359 ||rocketla ||[[File:Sa rocketla.png]] ||8 |
− | | 359 | ||
− | | | ||
− | | 8 | ||
− | |||
|- | |- | ||
− | | Heat Seeking Rocket Launcher | + | |36 ||Heat Seeking Rocket Launcher ||360 ||heatseek ||[[File:Sa heatseek.png]] ||8 |
− | | 360 | ||
− | | | ||
− | | 8 | ||
− | |||
|- | |- | ||
− | | Flame Thrower | + | |37 ||Flame Thrower ||361 ||flame ||[[File:Sa flame.png]] ||8 |
− | | 361 | ||
− | | | ||
− | | 8 | ||
− | |||
|- | |- | ||
− | | Minigun | + | |38 ||Minigun ||362 ||minigun ||[[File:Sa minigun.png]] ||8 |
− | | 362 | ||
− | | | ||
− | | 8 | ||
− | |||
|- | |- | ||
− | | Satchel Charges | + | |39 ||Satchel Charges ||363 ||satchel ||[[File:Sa satchel.png]] ||9 |
− | | 363 | ||
− | | | ||
− | | 9 | ||
− | |||
|- | |- | ||
− | | Detonator | + | |40 ||Detonator ||364 ||bomb ||[[File:Sa bomb.png]] ||13 |
− | | 364 | ||
− | | | ||
− | | 13 | ||
− | |||
|- | |- | ||
− | | Spray Paint | + | |41 ||Spray Paint ||365 ||spraycan ||[[File:Sa spraycan.png]] ||10 |
− | | 365 | ||
− | | | ||
− | | 10 | ||
− | |||
|- | |- | ||
− | | Fire Extinguisher | + | |42 ||Fire Extinguisher ||366 ||fire_ex ||[[File:Sa fire ex.png]] ||10 |
− | | 366 | ||
− | | | ||
− | | 10 | ||
− | |||
|- | |- | ||
− | | Camera | + | |43 ||Camera ||367 ||camera ||[[File:Sa camera.png]] ||10 |
− | | 367 | ||
− | | | ||
− | | 10 | ||
− | |||
|- | |- | ||
− | | Night-vision Goggles | + | |44 ||Night-vision Goggles ||368 ||nvgoggles ||[[File:Sa nvgoggles.png]] ||12 |
− | | 368 | ||
− | | | ||
− | | 12 | ||
− | |||
|- | |- | ||
− | | Thermal Goggles | + | |45 ||Thermal Goggles ||369 ||irgoggles ||[[File:Sa irgoggles.png]] ||12 |
− | | 369 | ||
− | | | ||
− | | 12 | ||
− | |||
|- | |- | ||
− | | Parachute | + | |46 ||Parachute ||371 ||gun_para ||[[File:Sa gun paraIcon.png]] ||12 |
− | | 371 | ||
− | | | ||
− | | 12 | ||
− | |||
|} | |} | ||
− | === GTA | + | === GTA IV === |
''Main article:'' [[List of Weapons (GTA4)]] | ''Main article:'' [[List of Weapons (GTA4)]] | ||
− | == External | + | == See also == |
− | * {{Icon|VC}} http://www.gtavice.com/weapons/ | + | * {{Icon|t}} [[Pickup]], general pickup information including weapon pickups |
− | * {{Icon|SA}} http://www.gtasanandreas.net/weapons/ | + | * {{Icon|t}} [[weapon.dat]], file containing general weapon data |
+ | * {{Icon|VC}} {{Icon|SA}} [[WEAP]], an [[IDE]] section for weapon definitions | ||
+ | * {{Icon|SA}} [[PICK]], an [[IPL]] section for weapon pickups | ||
+ | |||
+ | == External links == | ||
+ | * {{Icon|VC}} [http://www.gtavice.com/weapons/ Vice City Weapons] | ||
+ | * {{Icon|SA}} [http://www.gtasanandreas.net/weapons/ San Andreas Weapons] | ||
* {{GTAF|205020|Generic SA SCM Documentation}} | * {{GTAF|205020|Generic SA SCM Documentation}} | ||
+ | * {{Icon|VC}} [https://web.archive.org/web/20230111221512/http://archive.vc-mp.org/to2014/index.php?topic=194.msg1230 More Model Ids For Vice City] - Includes body armor model id. | ||
− | {{N|4|SA}} | + | {{N|4|LCS|SA|VC|3}} |
− | [[Category:Mission Script]][[Category:GTA | + | [[Category:Mission Script]][[Category:GTA 2]][[Category:GTA LCS]][[Category:GTA VCS]] |
Latest revision as of 22:25, 11 January 2023
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.
Contents
Mission script
Opcodes
0113 | adds ammo to the player's weapon | |
0114 | adds ammo to the character's weapon | |
017A | sets the player's weapon ammo | |
017B | sets the character's weapon ammo | |
01B1 | gives the weapon to the player | |
01B2 | gives the weapon to the character | |
01B8 | sets the current weapon of the player | |
01B9 | sets the current weapon of the character | |
0213 | creates a pickup with predefined ammo | |
0237 | sets the gang's weapons | |
02D7 | checks the current weapon of the player | |
02D8 | checks the current weapon of the character | |
02E2 | sets the character's weapon accuracy | |
031D | checks if the character is damaged by the weapon | |
031E | checks if the vehicle is damaged by the weapon | |
032B | creates a pickup with ammo | |
0419 | gets the ammo of the player's weapon | |
041A | gets the ammo of the character's weapon | |
0467 | clears the character's last weapon damage | |
0468 | clears the vehicle's last weapon damage | |
046F | gets the player's current weapon | |
0470 | gets the character's current weapon | |
048F | removes all of the character's weapons | |
0490 | checks if the player has the weapon | |
0491 | checks if the character has the weapon | |
04B8 | gets the character's weapon data | |
0501 | sets player can do drive by | |
0555 | removes the weapon from the character | |
0563 | ensures player has a drive-by weapon | |
06AB | hides all weapons | |
0713 | makes the character do drive bys | |
081A | sets the character's weapon skill | |
087E | sets the character to drop weapons after a death | |
0881 | sets the character be able to shoot | |
0946 | sets the character oblivious to weapon fire | |
0992 | sets the player's ability to scroll through weapons |
Native functions
- GET_AMMO_IN_CHAR_WEAPON
- GET_CHAR_WEAPON_IN_SLOT
- GET_CURRENT_CHAR_WEAPON
- GET_WEAPONTYPE_MODEL
- GET_WEAPONTYPE_SLOT
- GIVE_WEAPON_TO_CHAR
This section is incomplete. You can help by fixing and expanding it.
Lists of weapons
GTA 2
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.
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 | 0 | |||
1 | WEAPONTYPE_ |
Brass Knuckle | 259 | brassknuckle | 0 | |
2 | WEAPONTYPE_ |
Screw Driver | 260 | screwdriver | 1 | |
3 | WEAPONTYPE_ |
Golf Club | 261 | golfclub | 1 | |
4 | WEAPONTYPE_ |
Night Stick | 262 | nitestick | 1 | |
5 | WEAPONTYPE_ |
Knife | 263 | knifecur | 1 | |
6 | WEAPONTYPE_ |
Baseball Bat | 264 | bat | 1 | |
7 | WEAPONTYPE_ |
Hammer | 265 | hammer | 1 | |
8 | WEAPONTYPE_ |
Cleaver | 266 | cleaver | 1 | |
9 | WEAPONTYPE_ |
Machete | 267 | machete | 1 | |
10 | WEAPONTYPE_ |
Katana | 268 | katana | 1 | |
11 | WEAPONTYPE_ |
Chainsaw | 269 | chnsaw | 1 | |
12 | WEAPONTYPE_ |
Grenade | 270 | grenade | 2 | |
13 | WEAPONTYPE_ |
Remote Detonator | 270 291 |
grenade bomb |
2 | |
14 | WEAPONTYPE_ |
Tear Gas | 271 | teargas | 2 | |
15 | WEAPONTYPE_ |
Molotov | 272 | molotov | 2 | |
16 | WEAPONTYPE_ |
Missile | 273 | missile | - | 2 |
17 | WEAPONTYPE_ |
Colt .45 (Pistol) | 274 | colt45 | 3 | |
18 | WEAPONTYPE_ |
Python (.357) | 275 | python | 3 | |
19 | WEAPONTYPE_ |
Chrome Shotgun | 277 | chromegun | 4 | |
20 | WEAPONTYPE_ |
Spaz Shotgun (S.P.A.S. 12) | 278 | shotgspa | 4 | |
21 | WEAPONTYPE_ |
Stubby Shotgun | 279 | buddyshot | 4 | |
22 | WEAPONTYPE_ |
Tec-9 | 281 | tec9 | 5 | |
23 | WEAPONTYPE_ |
Uzi 9mm (Uz-I) | 282 | uzi | 5 | |
24 | WEAPONTYPE_ |
Ingram Mac 10 | 283 | ingramsl | 5 | |
25 | WEAPONTYPE_ |
MP5 (MP) | 284 | mp5lng | 5 | |
26 | WEAPONTYPE_ |
M4 | 280 | m4 | 6 | |
27 | WEAPONTYPE_ |
Ruger (Kruger) | 276 | ruger | 6 | |
28 | WEAPONTYPE_ |
Sniper Rifle | 285 | sniper | 8 | |
29 | WEAPONTYPE_ |
PSG-1 (.308 Sniper) | 286 | laser | 8 | |
30 | WEAPONTYPE_ |
Rocket Launcher | 287 | rocketla | 7 | |
31 | WEAPONTYPE_ |
Flame Thrower | 288 | flame | 7 | |
32 | WEAPONTYPE_ |
M60 | 289 | m60 | 7 | |
33 | WEAPONTYPE_ |
Minigun | 290 294 |
minigun minigun2 |
7 | |
34 | WEAPONTYPE_ |
Detonator | 291 | bomb | 9 | |
35 | WEAPONTYPE_ |
HeliCanon | 289 | m60 | - | 7 |
36 | WEAPONTYPE_ |
Camera | 292 | camera | 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)
See also
- Pickup, general pickup information including weapon pickups
- weapon.dat, file containing general weapon data
- WEAP, an IDE section for weapon definitions
- PICK, an IPL section for weapon pickups
External links
- Vice City Weapons
- San Andreas Weapons
- GTAForums: Generic SA SCM Documentation
- More Model Ids For Vice City - Includes body armor model id.
Grand Theft Auto IV | |
---|---|
File Formats | .dat • .gxt • .ide • .img • .ipl • .nod • .sco • .rpf • .rrr • .wad • .wbd/.wbn • .wdd • .wdr • .wft • .whm • .wpl • .wtd |
Documentation | Audio • Bink Video • Cryptography • Cutscenes • GXT Text • Image listing • Keycodes • Map Listing • Native functions • Paths • Radar Blips • Radio Stations • Saves • Scenarios • VTable • Weapons |
Tools | ASI Loader • ENBSeries • G-Texture • GIMS IV • Ingame WPL Editor • IV Needle • OpenIV • SparkIV • XLiveLess • WPL Manager • X Mod Installer Alice • C++ Script Hook • .NET Script Hook • Scocl |
Tutorials | Importing Textures with OpenIV • Importing Textures with SparkIV |
Modifications | GTA Connected • Gostown IV • Four Multiplayer • IV Multiplayer • CitizenMP:IV Reloaded |
Useful links | Community portal • Discussion forums • Modding forums • Mods on GTAGarage.com |
Grand Theft Auto: Liberty City Stories | |
---|---|
File Formats | .cfg • .chk • .dat • .dtz • .gxt • .ide • .img • .ipl • .mdl • .pss • .scm • .vb |
Documentation | Leeds Engine • Opcodes • Radio Stations • Saves • Scrollbar • Vehicles |
Tools | Sanny Builder |
Useful Links | Community Portal • Discussion Forum • Modding Topic • Mobile Modding |