A Weapon element is a simple representation of an in-game weapon. They should be used in an Inventory to create different loadouts.
Attributes
| Attribute Name | Type | Required | Description |
|---|---|---|---|
| Chance | Number | No | The chance that this weapon will be selected in favor of another. This is a normalized chance, meaning that if each chance attribute for each weapon is added up, the total should always be 100. If one weapon has a chance of 70, and another has a chance of 30, it means that there is a 70% chance that the first weapon will be selected instead of the second. |
Elements
| Element Name | Type | Required | Description |
|---|---|---|---|
| Model | Text | Yes | The model name of the weapon, e.g. WEAPON_PUMPSHOTGUN |
| Component * | Text | No | See below. |
* Denotes zero or more elements may be present.
Components
By using the Component element, it is possible to give each Weapon any number of additional components such as silencers, flashlights, etc. Be aware that while most weapons in GTA V have additional components, some do not. Additionally, some components may not function properly when the weapon is being used by an NPC. Components can also be specified using their decimal hash.
Example
<Weapon chance="70"> <Model>WEAPON_CARBINERIFLE_MK2</Model> <Component>COMPONENT_AT_CR_BARREL_02</Component> <!-- Heavy Barrel --> <Component>COMPONENT_AT_MUZZLE_07</Component> <!-- Muzzle Brake --> <Component>COMPONENT_AT_SCOPE_MEDIUM_MK2</Component> <!-- Scope --> <Component>COMPONENT_AT_AR_AFGRIP_02</Component> <!-- Grip --> </Weapon>
A weapon Element defining a Carbine Rifle Mark II with additional components.
Additional Information
You can find a list of weapons here: https://wiki.rage.mp/index.php?title=Weapons
You can find a list of weapon components here: https://wiki.rage.mp/index.php?title=Weapons_Components
Note that these lists may be outdated as additional weapons are frequently introduced in content updates to the game.
Recommended Comments