Weaponsbeginner12 min readupdated 19 Sept 2026

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

The 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.

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.

GTA 5 weapon model names: the w_ files behind every gun — illustrated with a FiveM-compatible minimap render

#Weapon names versus model names

KindExampleUsed by
Weapon nameWEAPON_CARBINERIFLENatives, inventories, weapons.meta Name
Weapon hashjoaat('WEAPON_CARBINERIFLE')Everything at runtime
Model namew_ar_carbinerifleModel files, archetypes, props
Texture dictionaryw_ar_carbinerifle.ytdTextures for that model
Display labelWT_RIFLE_CBN style label keyThe name players see

One weapon, several names

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 walks through that side.

#What the prefixes mean

PrefixFamilyExample
w_pi_Pistols and handgunsw_pi_pistol, w_pi_stungun
w_sb_SMGs (sub-machine)w_sb_smg, w_sb_microsmg
w_ar_Assault rifles and carbinesw_ar_carbinerifle, w_ar_assaultrifle
w_sg_Shotgunsw_sg_pumpshotgun, w_sg_sawnoff
w_sr_Sniper and marksman riflesw_sr_sniperrifle, w_sr_heavysniper
w_mg_Machine gunsw_mg_mg, w_mg_combatmg
w_lr_Launchersw_lr_rpg, w_lr_grenadelauncher
w_ex_Explosives and throwablesw_ex_grenadefrag, w_ex_molotov
w_me_Meleew_me_bat, w_me_knife_01
w_am_Ammo and misc itemsw_am_jerrycan, w_am_flare
w_at_Attachmentsw_at_ar_supp, w_at_scope_medium

Weapon model prefixes

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

WeaponModel
WEAPON_PISTOLw_pi_pistol
WEAPON_COMBATPISTOLw_pi_combatpistol
WEAPON_APPISTOLw_pi_appistol
WEAPON_PISTOL50w_pi_pistol50
WEAPON_SNSPISTOLw_pi_sns_pistol
WEAPON_HEAVYPISTOLw_pi_heavypistol
WEAPON_VINTAGEPISTOLw_pi_vintage_pistol
WEAPON_REVOLVERw_pi_revolver
WEAPON_PISTOL_MK2w_pi_pistolmk2
WEAPON_STUNGUNw_pi_stungun
WEAPON_MICROSMGw_sb_microsmg
WEAPON_SMGw_sb_smg
WEAPON_ASSAULTSMGw_sb_assaultsmg
WEAPON_COMBATPDWw_sb_pdw
WEAPON_MACHINEPISTOLw_sb_compactsmg
WEAPON_MINISMGw_sb_minismg
WEAPON_GUSENBERGw_sb_gusenberg

Handguns and SMGs

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

WeaponModel
WEAPON_ASSAULTRIFLEw_ar_assaultrifle
WEAPON_CARBINERIFLEw_ar_carbinerifle
WEAPON_ADVANCEDRIFLEw_ar_advancedrifle
WEAPON_SPECIALCARBINEw_ar_specialcarbine
WEAPON_BULLPUPRIFLEw_ar_bullpuprifle
WEAPON_COMPACTRIFLEw_ar_assaultrifle_smg
WEAPON_CARBINERIFLE_MK2w_ar_carbineriflemk2
WEAPON_PUMPSHOTGUNw_sg_pumpshotgun
WEAPON_SAWNOFFSHOTGUNw_sg_sawnoff
WEAPON_ASSAULTSHOTGUNw_sg_assaultshotgun
WEAPON_HEAVYSHOTGUNw_sg_heavyshotgun
WEAPON_DBSHOTGUNw_sg_doublebarrel
WEAPON_SNIPERRIFLEw_sr_sniperrifle
WEAPON_HEAVYSNIPERw_sr_heavysniper
WEAPON_MARKSMANRIFLEw_sr_marksmanrifle
WEAPON_MGw_mg_mg
WEAPON_COMBATMGw_mg_combatmg
WEAPON_RPGw_lr_rpg

Long guns

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.

#Melee and throwables

WeaponModel
WEAPON_KNIFEw_me_knife_01
WEAPON_BATw_me_bat
WEAPON_CROWBARw_me_crowbar
WEAPON_GOLFCLUBw_me_gclub
WEAPON_NIGHTSTICKw_me_nightstick
WEAPON_MACHETEw_me_machette_lr
WEAPON_SWITCHBLADEw_me_switchblade
WEAPON_KNUCKLEw_me_knuckle
WEAPON_GRENADEw_ex_grenadefrag
WEAPON_SMOKEGRENADEw_ex_grenadesmoke
WEAPON_MOLOTOVw_ex_molotov
WEAPON_PETROLCANw_am_jerrycan
WEAPON_FLAREw_am_flare

Melee and thrown weapons

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 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
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 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.

#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
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.
  • 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.
Share this guideXRedditFacebook

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.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.

Relevant to what you just read

The tool for this

Put your own artwork on 538 weapon models From $5, built in the browser, exported as a drop-in resource.

Look it up while you work

The reference tables this guide leans on, free and without an account.