Difference between revisions of "Weapon"

From GTAMods Wiki
Jump to navigation Jump to search
(GTA3: some revisions)
Line 47: Line 47:
 
== Lists of Weapons ==
 
== Lists of Weapons ==
 
=== GTA3 ===
 
=== GTA3 ===
{{Incomplete}}
+
Unlike in Vice City and San Andreas, where each weapon has a separate mesh and texture, GTA3's weapons are stored in two DFF and TXD files, 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. Most of the information on the weapons are located in the <code>[[weapon.dat]]</code> file.
 +
 
 +
{{incomplete}}
  
 
=== Vice City ===
 
=== Vice City ===

Revision as of 03:34, 28 April 2009

This article contains generic information about weapons, their placement and usage. For the definition through IDE 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 feature 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

Some opcodes (like 032B or 0213) require a pickup type. There are several pickup types. For a list of all types see Pickup types.

Native functions

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

Lists of Weapons

GTA3

Unlike in Vice City and San Andreas, where each weapon has a separate mesh and texture, GTA3's weapons are stored in two DFF and TXD files, 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.

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

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.

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 4

Main article: List of Weapons (GTA4)

External Link