GTA 5 weapon model names: the w_ files behind every gun
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.

#Weapon names versus model 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 |
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
| 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 |
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
| 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 |
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
| 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 |
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
| 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 |
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.
_mag1is the standard magazine and_mag2the 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_suppandw_at_pi_supp_2are pistol suppressors,w_at_ar_suppthe rifle suppressor,w_at_ar_flshandw_at_pi_flshflashlights, and scopes fromw_at_scope_smalltow_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_camo1tocamo10, 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/
fxmanifest.lua
stream/
w_pi_appistol.ydr
w_pi_appistol.ytd
w_pi_appistol_mag1.ydr
w_pi_appistol_mag2.ydrWhether 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.ydrreplaces the AP Pistol;w_pi_ap_pistol.ydrreplaces 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_m4a1tells 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'smodelNameandtxdName, and theModelfield 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'sw_ar_m4a1on the same server. - Name magazines the vanilla way.
_mag1and_mag2make 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.
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 withjoaat('w_...')to confirm a guess. - In the game files: open the weapon's weapons.meta entry and read the
Modelfield, then find the.ydrof 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
Modelfield and the archetype'smodelNamein 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?
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?
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?
_mag1, _mag2) with their own textures. Replace or retexture them as well.How do I spawn a gun as a prop in FiveM?
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.
- All 21,631 object model namesEvery model CreateObject accepts, with its hash and a flag for the LOD and proxy names that spawn invisible.
- The map modding glossary38 terms — file formats, radar parts, framework words — each with a one-line answer first.
- The same tables as JSON and CSVFree downloads, CORS open, no account and no API key — ship the list inside your own resource instead of scraping a page.