# GTA 5 weapon model names: the w_ files behind every gun

> Every GTA 5 weapon has a w_ model file: see model names by weapon, what the prefixes mean, the magazine and attachment models, and how to spawn them in FiveM.

Source: https://fam-tools.com/guides/gta-5-weapon-model-names · FAM Tools · published 2026-09-19 · updated 2026-09-19 · about 12 min

**Short answer.** Weapon models start with `w_` plus a type prefix: `w_pi_` pistols, `w_sb_` SMGs, `w_ar_` assault rifles, `w_sg_` shotguns, `w_sr_` snipers, `w_mg_` machine guns, `w_lr_` launchers, `w_ex_` explosives, `w_me_` melee, `w_am_` misc items and `w_at_` attachments. Magazines are separate models (`w_pi_pistol_mag1`, `_mag2`), as are luxury finishes (`_luxe`) and Mk II camos. Get a weapon's model in code with `GetWeapontypeModel(hash)` and a component's with `GetWeaponComponentTypeModel(hash)`; spawn a prop with `CreateObject` after `RequestModel`.

## Key points

- The weapon name (`WEAPON_...`) and the model name (`w_...`) are different things.
- The prefix tells you the weapon family; it does not always match the weapon name (the machete is `w_me_machette_lr`).
- Magazines, attachments and finishes are separate models you may also need to replace.
- `GetWeapontypeModel` reads the model from weapons.meta, so it works for add-on weapons.
- Spawn props with `CreateObject`; attach-safe weapon props should not come from `CreateWeaponObject`.

A weapon in GTA V is two names. `WEAPON_CARBINERIFLE` is what scripts, inventories and damage events use. `w_ar_carbinerifle` is the model: the `.ydr` file you replace to reskin the gun, the prop you spawn on a table in a gun store, the thing attached to a player's back. Mixing the two up is behind a surprising number of "my skin does not show" and "prop will not spawn" questions.

## Weapon names versus model names

*One weapon, several names*

| Kind | Example | Used by |
| --- | --- | --- |
| Weapon name | `WEAPON_CARBINERIFLE` | Natives, inventories, weapons.meta `Name` |
| Weapon hash | `joaat('WEAPON_CARBINERIFLE')` | Everything at runtime |
| Model name | `w_ar_carbinerifle` | Model files, archetypes, props |
| Texture dictionary | `w_ar_carbinerifle.ytd` | Textures for that model |
| Display label | `WT_RIFLE_CBN` style label key | The name players see |

The link between them is the `Model` field in the weapon's weapons.meta entry. That is also why a weapon skin is a model or texture replacement, never a change to the weapon name: you keep `WEAPON_CARBINERIFLE` and swap what `w_ar_carbinerifle` looks like. [Making a weapon skin](https://fam-tools.com/guides/make-a-fivem-weapon-skin) walks through that side.

## What the prefixes mean

*Weapon model prefixes*

| Prefix | Family | Example |
| --- | --- | --- |
| `w_pi_` | Pistols and handguns | `w_pi_pistol`, `w_pi_stungun` |
| `w_sb_` | SMGs (sub-machine) | `w_sb_smg`, `w_sb_microsmg` |
| `w_ar_` | Assault rifles and carbines | `w_ar_carbinerifle`, `w_ar_assaultrifle` |
| `w_sg_` | Shotguns | `w_sg_pumpshotgun`, `w_sg_sawnoff` |
| `w_sr_` | Sniper and marksman rifles | `w_sr_sniperrifle`, `w_sr_heavysniper` |
| `w_mg_` | Machine guns | `w_mg_mg`, `w_mg_combatmg` |
| `w_lr_` | Launchers | `w_lr_rpg`, `w_lr_grenadelauncher` |
| `w_ex_` | Explosives and throwables | `w_ex_grenadefrag`, `w_ex_molotov` |
| `w_me_` | Melee | `w_me_bat`, `w_me_knife_01` |
| `w_am_` | Ammo and misc items | `w_am_jerrycan`, `w_am_flare` |
| `w_at_` | Attachments | `w_at_ar_supp`, `w_at_scope_medium` |

Newer DLC weapons do not always follow the pattern. The Military Rifle's model is `w_ar_bullpuprifleh4`, the Combat Shotgun's is `w_sg_pumpshotgunh4`, the Machine Pistol's is `w_sb_compactsmg` and the Service Carbine's is `w_ar_carbinerifle_reh`. Some names in the game data are written in mixed case (`W_PI_PISTOL`, `W_SB_PDW`); model hashes are case-insensitive, and files are conventionally stored in lower case.

## Pistols and SMGs

*Handguns and SMGs*

| Weapon | Model |
| --- | --- |
| `WEAPON_PISTOL` | `w_pi_pistol` |
| `WEAPON_COMBATPISTOL` | `w_pi_combatpistol` |
| `WEAPON_APPISTOL` | `w_pi_appistol` |
| `WEAPON_PISTOL50` | `w_pi_pistol50` |
| `WEAPON_SNSPISTOL` | `w_pi_sns_pistol` |
| `WEAPON_HEAVYPISTOL` | `w_pi_heavypistol` |
| `WEAPON_VINTAGEPISTOL` | `w_pi_vintage_pistol` |
| `WEAPON_REVOLVER` | `w_pi_revolver` |
| `WEAPON_PISTOL_MK2` | `w_pi_pistolmk2` |
| `WEAPON_STUNGUN` | `w_pi_stungun` |
| `WEAPON_MICROSMG` | `w_sb_microsmg` |
| `WEAPON_SMG` | `w_sb_smg` |
| `WEAPON_ASSAULTSMG` | `w_sb_assaultsmg` |
| `WEAPON_COMBATPDW` | `w_sb_pdw` |
| `WEAPON_MACHINEPISTOL` | `w_sb_compactsmg` |
| `WEAPON_MINISMG` | `w_sb_minismg` |
| `WEAPON_GUSENBERG` | `w_sb_gusenberg` |

The AP Pistol, a frequent skin request, is `w_pi_appistol`; replacing that model and its texture dictionary is what an "AP pistol skin" resource does.

## Rifles, shotguns and heavy weapons

*Long guns*

| Weapon | Model |
| --- | --- |
| `WEAPON_ASSAULTRIFLE` | `w_ar_assaultrifle` |
| `WEAPON_CARBINERIFLE` | `w_ar_carbinerifle` |
| `WEAPON_ADVANCEDRIFLE` | `w_ar_advancedrifle` |
| `WEAPON_SPECIALCARBINE` | `w_ar_specialcarbine` |
| `WEAPON_BULLPUPRIFLE` | `w_ar_bullpuprifle` |
| `WEAPON_COMPACTRIFLE` | `w_ar_assaultrifle_smg` |
| `WEAPON_CARBINERIFLE_MK2` | `w_ar_carbineriflemk2` |
| `WEAPON_PUMPSHOTGUN` | `w_sg_pumpshotgun` |
| `WEAPON_SAWNOFFSHOTGUN` | `w_sg_sawnoff` |
| `WEAPON_ASSAULTSHOTGUN` | `w_sg_assaultshotgun` |
| `WEAPON_HEAVYSHOTGUN` | `w_sg_heavyshotgun` |
| `WEAPON_DBSHOTGUN` | `w_sg_doublebarrel` |
| `WEAPON_SNIPERRIFLE` | `w_sr_sniperrifle` |
| `WEAPON_HEAVYSNIPER` | `w_sr_heavysniper` |
| `WEAPON_MARKSMANRIFLE` | `w_sr_marksmanrifle` |
| `WEAPON_MG` | `w_mg_mg` |
| `WEAPON_COMBATMG` | `w_mg_combatmg` |
| `WEAPON_RPG` | `w_lr_rpg` |

The Compact Rifle is a good example of why a lookup beats guessing: its model is `w_ar_assaultrifle_smg`. For the full weapon list with hashes, see [the weapon names and hashes list](https://fam-tools.com/guides/gta-5-weapon-names-hashes-list).

## Melee and throwables

*Melee and thrown weapons*

| Weapon | Model |
| --- | --- |
| `WEAPON_KNIFE` | `w_me_knife_01` |
| `WEAPON_BAT` | `w_me_bat` |
| `WEAPON_CROWBAR` | `w_me_crowbar` |
| `WEAPON_GOLFCLUB` | `w_me_gclub` |
| `WEAPON_NIGHTSTICK` | `w_me_nightstick` |
| `WEAPON_MACHETE` | `w_me_machette_lr` |
| `WEAPON_SWITCHBLADE` | `w_me_switchblade` |
| `WEAPON_KNUCKLE` | `w_me_knuckle` |
| `WEAPON_GRENADE` | `w_ex_grenadefrag` |
| `WEAPON_SMOKEGRENADE` | `w_ex_grenadesmoke` |
| `WEAPON_MOLOTOV` | `w_ex_molotov` |
| `WEAPON_PETROLCAN` | `w_am_jerrycan` |
| `WEAPON_FLARE` | `w_am_flare` |

The tear gas grenade and the BZ gas grenade share `w_ex_grenadesmoke`, so replacing that model changes both.

## Magazines, attachments and finishes

A weapon on screen is often several models at once. The game object list includes, for the standard pistol alone, `w_pi_pistol`, `w_pi_pistol_mag1`, `w_pi_pistol_mag2`, `w_pi_pistol_luxe` and luxe magazine variants.

- **Magazines.** `_mag1` is the standard magazine and `_mag2` the extended one. If your skin changes the gun but the magazine keeps the vanilla texture, you replaced the body and forgot the magazines.
- **Attachments** use `w_at_` models: `w_at_pi_supp` and `w_at_pi_supp_2` are pistol suppressors, `w_at_ar_supp` the rifle suppressor, `w_at_ar_flsh` and `w_at_pi_flsh` flashlights, and scopes from `w_at_scope_small` to `w_at_scope_max`.
- **Luxury finishes** (`_luxe`) are separate models used by the Yusuf Amir finish components.
- **Mk II camos** are separate models too, such as `w_pi_pistolmk2_camo1` to `camo10`, plus slide camos. [MK II camos](https://fam-tools.com/guides/fivem-mk2-camo-liveries) explains how they apply.

In code, `GetWeaponComponentTypeModel(componentHash)` gives you the model for a component, which is what you need to load before attaching it to a displayed weapon.

## Which files a skin replaces

Model names matter most when you are reskinning a vanilla gun, because a replacement is nothing more than a file with exactly the right name in a resource's `stream` folder. For the AP Pistol, a complete replace looks like this:

*ap_pistol_skin resource*

```text
ap_pistol_skin/
  fxmanifest.lua
  stream/
    w_pi_appistol.ydr
    w_pi_appistol.ytd
    w_pi_appistol_mag1.ydr
    w_pi_appistol_mag2.ydr
```

Whether you need the `.ydr`, the `.ytd` or both depends on the change. A pure recolour usually only needs the texture dictionary; a new shape needs the model. Magazines and attachments often read their textures from the weapon's dictionary, so check what textures they reference before deciding they need their own file. [.ydr vs .ytd](https://fam-tools.com/guides/ydr-vs-ytd-explained) explains which file holds what.

Two rules save hours:

- **Exact names only.** `w_pi_appistol.ydr` replaces the AP Pistol; `w_pi_ap_pistol.ydr` replaces nothing and is silently ignored.
- **One resource per model.** If two resources stream the same file name, one wins and the other does nothing. That is the most common reason a new skin "does not work" on a server that already has a weapon pack.

Replacing a vanilla model changes the weapon for every player. If you want the new look as a separate weapon, you need an add-on with its own model name, covered in [replace vs add-on weapons](https://fam-tools.com/guides/fivem-replace-vs-addon-weapons).

## Naming models for add-on weapons

Add-on weapons need model names that do not exist in the base game, and following the vanilla pattern keeps a server readable. A few conventions that pack authors converge on:

- **Keep the prefix.** An add-on rifle called `w_ar_m4a1` tells anyone reading the files what it is, and sorts next to the vanilla rifles in a file browser.
- **Match everything to the model name.** The `.ydr`, the `.ytd`, the archetype's `modelName` and `txdName`, and the `Model` field in weapons.meta should all use the same name. Mismatches are the classic cause of invisible or untextured add-on weapons.
- **Namespace your packs.** A short tag, such as `w_ar_xyz_m4a1`, avoids collisions with another creator's `w_ar_m4a1` on the same server.
- **Name magazines the vanilla way.** `_mag1` and `_mag2` make it obvious which component uses which model when you write weaponcomponents.meta.

Because `GetWeapontypeModel` reads the `Model` field, scripts that show weapons as props, such as gun store displays or back-slung rifles, pick up correctly named add-on models with no extra configuration.

## Spawning weapon props in FiveM

Weapon models are ordinary models as far as props go, which makes them useful for gun store displays, evidence tables and back-slung weapons.

*client.lua*

```lua
local function spawnWeaponProp(weaponName, coords, heading)
    local model = GetWeapontypeModel(joaat(weaponName))
    if model == 0 then return end

    RequestModel(model)
    while not HasModelLoaded(model) do Wait(0) end

    local obj = CreateObject(model, coords.x, coords.y, coords.z, false, false, false)
    SetEntityHeading(obj, heading)
    FreezeEntityPosition(obj, true)
    SetModelAsNoLongerNeeded(model)
    return obj
end

local display = spawnWeaponProp('WEAPON_CARBINERIFLE', vec3(22.0, -1105.5, 29.9), 160.0)
```

There is also `CreateWeaponObject(weaponHash, ammoCount, x, y, z, bCreateDefaultComponents, scale, customModelHash)`, which builds a proper weapon object and can include default components. The native reference notes that such objects cannot be attached to a ped, so use `CreateObject` for anything that goes on a player, and `CreateWeaponObject` for a static display that should look fully kitted out. To add an attachment to a display weapon created that way, load the component's model and call `GiveWeaponComponentToWeaponObject(object, componentHash)`.

## Finding model names yourself

- **In code:** `GetWeapontypeModel(joaat('WEAPON_X'))` returns the hash of the model; compare it with `joaat('w_...')` to confirm a guess.
- **In the game files:** open the weapon's weapons.meta entry and read the `Model` field, then find the `.ydr` of the same name with CodeWalker or OpenIV; see [OpenIV vs CodeWalker vs Sollumz](https://fam-tools.com/guides/openiv-codewalker-sollumz).
- **Object browsers:** online object databases list every `w_` model with a preview, which helps when you need a magazine or attachment name.
- **For add-on weapons:** the `Model` field and the archetype's `modelName` in the pack's own meta files are the only source of truth, since those models do not exist in the base game.

## Questions

### What is the model name of the pistol in GTA 5?

`w_pi_pistol`. Its magazines are `w_pi_pistol_mag1` and `w_pi_pistol_mag2`.

### What does w_ar_ mean in GTA 5 weapon models?

Assault rifle. Weapon models use prefixes such as `w_pi_` (pistol), `w_sb_` (SMG), `w_sg_` (shotgun), `w_sr_` (sniper), `w_me_` (melee) and `w_at_` (attachment).

### How do I get a weapon's model in a FiveM script?

Call `GetWeapontypeModel(joaat('WEAPON_NAME'))`. It returns the model hash from the weapon's weapons.meta, including for add-on weapons.

### Why does my weapon skin not change the magazine?

Magazines are separate models (`_mag1`, `_mag2`) with their own textures. Replace or retexture them as well.

### How do I spawn a gun as a prop in FiveM?

Load the model from `GetWeapontypeModel` with `RequestModel`, then create it with `CreateObject` and freeze it in place for displays.

## Related

- https://fam-tools.com/guides/gta-5-weapon-names-hashes-list
- https://fam-tools.com/guides/ydr-vs-ytd-explained
- https://fam-tools.com/guides/make-a-fivem-weapon-skin
- https://fam-tools.com/guides/fivem-weapon-components-attachments
- https://fam-tools.com/guides/fivem-weapons-on-back
