Weaponsbeginner14 min readupdated 11 Sept 2026

Every GTA V weapon name and hash, for FiveM scripts

The short answer

A weapon’s name (for example WEAPON_PISTOL) is turned into a 32-bit hash with GTA’s joaat function; WEAPON_PISTOL is 0x1B06D571, which is 453432689. Natives accept the name through GetHashKey / `WEAPON_PISTOL` in Lua, and some APIs return the same hash as a signed integer. The tables below list all 108 vanilla weapons.

Almost every weapon script in FiveM starts with a name like WEAPON_PISTOL and ends with a number the game actually uses. This page is the reference you keep open while scripting: every vanilla GTA V weapon, grouped by class, with its spawn name, its hash in both forms you will meet, and the ammo item ox_inventory uses for it. The hashes were computed with the game’s own joaat function, so they are exact.

Every GTA V weapon name and hash, for FiveM scripts — illustrated with a FiveM-compatible minimap render

#Names, hashes and the two ways a hash is printed

GTA V identifies weapons, vehicles, peds and almost everything else by a 32-bit hash of their name, produced by Bob Jenkins’ one-at-a-time function, which the modding community calls joaat. The function lowercases the name first, so capitalisation never matters.

The same 32 bits can be read two ways. As an unsigned number WEAPON_ASSAULTRIFLE is 3220176749 (0xBFEFFF6D); read as a signed 32-bit integer it is −1074790547. GetSelectedPedWeapon and several other natives hand back the signed form, which is why a comparison against a hash copied from a website sometimes fails even though both numbers mean the same weapon.

Getting a hash in Lua (client or server)
local a = GetHashKey('WEAPON_PISTOL')   -- 453432689
local b = joaat('WEAPON_PISTOL')        -- same value (CfxLua helper)
local c = `WEAPON_PISTOL`              -- same value, computed at compile time

-- Compare the weapon in hand without worrying about signed/unsigned:
local current = GetSelectedPedWeapon(PlayerPedId())
if current == `WEAPON_PISTOL` then
    print('holding a pistol')
end
JavaScript and C#
// JavaScript (FiveM runtime)
const hash = GetHashKey('WEAPON_PISTOL');

// C# (CitizenFX.Core)
uint hash = (uint)API.GetHashKey("WEAPON_PISTOL");

#Pistols (20)

Sidearms, including the Mk II variants, the stun gun and the flare gun.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
PistolWEAPON_PISTOL0x1B06D571453432689ammo-9
Pistol MK2WEAPON_PISTOL_MK20xBFE256D4-1075685676ammo-9
Combat PistolWEAPON_COMBATPISTOL0x5EF9FEC41593441988ammo-9
AP PistolWEAPON_APPISTOL0x22D8FE39584646201ammo-9
Pistol .50WEAPON_PISTOL500x99AEEB3B-1716589765ammo-50
SNS PistolWEAPON_SNSPISTOL0xBFD21232-1076751822ammo-45
SNS Pistol MK2WEAPON_SNSPISTOL_MK20x88374054-2009644972ammo-45
Heavy PistolWEAPON_HEAVYPISTOL0xD205520E-771403250ammo-45
Vintage PistolWEAPON_VINTAGEPISTOL0x083839C4137902532ammo-9
Marksman PistolWEAPON_MARKSMANPISTOL0xDC4DB296-598887786ammo-22
RevolverWEAPON_REVOLVER0xC1B3C3D1-1045183535ammo-44
Revolver MK2WEAPON_REVOLVER_MK20xCB96392F-879347409ammo-44
Double Action RevolverWEAPON_DOUBLEACTION0x97EA20B8-1746263880ammo-38
Ceramic PistolWEAPON_CERAMICPISTOL0x2B5EF5EC727643628ammo-9
Navy RevolverWEAPON_NAVYREVOLVER0x917F6C8C-1853920116ammo-44
Perico PistolWEAPON_GADGETPISTOL0x57A4368C1470379660ammo-9
WM 29 PistolWEAPON_PISTOLXM30x1BC4FDB9465894841ammo-9
TazerWEAPON_STUNGUN0x3656C8C1911657153—
Flare GunWEAPON_FLAREGUN0x477571241198879012ammo-flare
Up-n-AtomizerWEAPON_RAYPISTOL0xAF3696A1-1355376991—

#Submachine guns (8)

Compact automatic weapons. WEAPON_TECPISTOL is the Tactical SMG despite its internal name.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
Micro SMGWEAPON_MICROSMG0x13532244324215364ammo-45
SMGWEAPON_SMG0x2BE6766B736523883ammo-9
SMG Mk2WEAPON_SMG_MK20x78A97CD02024373456ammo-9
Assault SMGWEAPON_ASSAULTSMG0xEFE7E2DF-270015777ammo-rifle
Combat PDWWEAPON_COMBATPDW0x0A3D4D34171789620ammo-9
Machine PistolWEAPON_MACHINEPISTOL0xDB1AA450-619010992ammo-9
Mini SMGWEAPON_MINISMG0xBD248B55-1121678507ammo-9
Tactical SMGWEAPON_TECPISTOL0x14E5AFD5350597077ammo-9

#Assault rifles (14)

Rifles and carbines, the core of most police and gang arsenals.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
Assault RifleWEAPON_ASSAULTRIFLE0xBFEFFF6D-1074790547ammo-rifle2
Assault Rifle MK2WEAPON_ASSAULTRIFLE_MK20x394F415C961495388ammo-rifle2
Carbine RifleWEAPON_CARBINERIFLE0x83BF0278-2084633992ammo-rifle
Carbine Rifle MK2WEAPON_CARBINERIFLE_MK20xFAD1F1C9-86904375ammo-rifle
Advanced RifleWEAPON_ADVANCEDRIFLE0xAF113F99-1357824103ammo-rifle
Special CarbineWEAPON_SPECIALCARBINE0xC0A3098D-1063057011ammo-rifle
Special Carbine MK2WEAPON_SPECIALCARBINE_MK20x969C3D67-1768145561ammo-rifle
Bullpup RifleWEAPON_BULLPUPRIFLE0x7F229F942132975508ammo-rifle
Bullpup Rifle MK2WEAPON_BULLPUPRIFLE_MK20x84D6FAFD-2066285827ammo-rifle
Compact RifleWEAPON_COMPACTRIFLE0x624FE8301649403952ammo-rifle2
Military RifleWEAPON_MILITARYRIFLE0x9D1F17E6-1658906650ammo-rifle
Heavy RifleWEAPON_HEAVYRIFLE0xC78D71B4-947031628ammo-rifle
Tactical RifleWEAPON_TACTICALRIFLE0xD1D5F52B-774507221ammo-rifle
Battle RifleWEAPON_BATTLERIFLE0x72B66B111924557585ammo-rifle2

#Shotguns (10)

Pump, semi-automatic and break-action shotguns, plus the musket.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
Pump ShotgunWEAPON_PUMPSHOTGUN0x1D073A89487013001ammo-shotgun
Pump Shotgun MK2WEAPON_PUMPSHOTGUN_MK20x555AF99A1432025498ammo-shotgun
Sawn Off ShotgunWEAPON_SAWNOFFSHOTGUN0x7846A3182017895192ammo-shotgun
Assault ShotgunWEAPON_ASSAULTSHOTGUN0xE284C527-494615257ammo-shotgun
Bullpup ShotgunWEAPON_BULLPUPSHOTGUN0x9D61E50F-1654528753ammo-shotgun
MusketWEAPON_MUSKET0xA89CB99E-1466123874ammo-musket
Heavy ShotgunWEAPON_HEAVYSHOTGUN0x3AABBBAA984333226ammo-shotgun
Double Barrel ShotgunWEAPON_DBSHOTGUN0xEF951FBB-275439685ammo-shotgun
Sweeper ShotgunWEAPON_AUTOSHOTGUN0x12E82D3D317205821ammo-shotgun
Combat ShotgunWEAPON_COMBATSHOTGUN0x05A96BA494989220ammo-shotgun

#Machine guns (5)

Belt-fed and drum-fed automatic weapons.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
Machine GunWEAPON_MG0x9D07F764-1660422300ammo-rifle2
Combat MGWEAPON_COMBATMG0x7FD629622144741730ammo-rifle
Combat MG MK2WEAPON_COMBATMG_MK20xDBBD7280-608341376ammo-rifle2
GusenbergWEAPON_GUSENBERG0x610126831627465347ammo-45
Unholy HellbringerWEAPON_RAYCARBINE0x476BF1551198256469ammo-laser

#Sniper and marksman rifles (6)

Long-range rifles; most accept scopes as components.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
Sniper RifleWEAPON_SNIPERRIFLE0x05FC3C11100416529ammo-sniper
Heavy SniperWEAPON_HEAVYSNIPER0x0C472FE2205991906ammo-heavysniper
Heavy Sniper MK2WEAPON_HEAVYSNIPER_MK20x0A914799177293209ammo-heavysniper
Marksman RifleWEAPON_MARKSMANRIFLE0xC734385A-952879014ammo-sniper
Marksman Rifle MK2WEAPON_MARKSMANRIFLE_MK20x6A6C02E01785463520ammo-sniper
Precision RifleWEAPON_PRECISIONRIFLE0x6E7DDDEC1853742572ammo-sniper

#Heavy weapons (11)

Launchers, miniguns and the railguns. Most servers restrict or remove these.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
RPGWEAPON_RPG0xB1CA77B1-1312131151ammo-rocket
Grenade LauncherWEAPON_GRENADELAUNCHER0xA284510B-1568386805ammo-grenade
MinigunWEAPON_MINIGUN0x42BF8A851119849093ammo-rifle2
Firework LauncherWEAPON_FIREWORK0x7F7497E52138347493ammo-firework
RailgunWEAPON_RAILGUN0x6D544C991834241177ammo-railgun
Railgun XM3WEAPON_RAILGUNXM30xFEA23564-22923932ammo-railgun
Homing LauncherWEAPON_HOMINGLAUNCHER0x63AB04421672152130ammo-rocket
Compact Grenade LauncherWEAPON_COMPACTLAUNCHER0x0781FE4A125959754ammo-grenade
WidowmakerWEAPON_RAYMINIGUN0xB62D1F67-1238556825ammo-laser
Compact EMP LauncherWEAPON_EMPLAUNCHER0xDB26713A-618237638ammo-emp
Snowball LauncherWEAPON_SNOWLAUNCHER0x03BF557562870901WEAPON_SNOWBALL

#Melee (18)

Melee weapons carry no ammo; WEAPON_UNARMED (fists, 0xA2719263) is not listed as an item.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
KnifeWEAPON_KNIFE0x99B507EA-1716189206—
NightstickWEAPON_NIGHTSTICK0x678B81B11737195953—
HammerWEAPON_HAMMER0x4E875F731317494643—
BatWEAPON_BAT0x958A4A8F-1786099057—
CrowbarWEAPON_CROWBAR0x84BD7BFD-2067956739—
Golf ClubWEAPON_GOLFCLUB0x440E47881141786504—
BottleWEAPON_BOTTLE0xF9E6AA4B-102323637—
DaggerWEAPON_DAGGER0x92A27487-1834847097—
HatchetWEAPON_HATCHET0xF9DCBF2D-102973651—
Knuckle DustersWEAPON_KNUCKLE0xD8DF3C3C-656458692—
MacheteWEAPON_MACHETE0xDD5DF8D9-581044007—
FlashlightWEAPON_FLASHLIGHT0x8BB05FD7-1951375401—
SwitchbladeWEAPON_SWITCHBLADE0xDFE37640-538741184—
Pool CueWEAPON_POOLCUE0x94117305-1810795771—
WrenchWEAPON_WRENCH0x19044EE0419712736—
Battle AxeWEAPON_BATTLEAXE0xCD274149-853065399—
Stone HatchetWEAPON_STONE_HATCHET0x3813FC08940833800—
Candy CaneWEAPON_CANDYCANE0x6589186A1703483498—

#Throwables (11)

Grenades, gas, explosives and harmless throwables such as the ball and snowball.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
GrenadeWEAPON_GRENADE0x93E220BD-1813897027—
BZ GasWEAPON_BZGAS0xA0973D5E-1600701090—
Tear GasWEAPON_TEARGAS0x26CCE1DE650961374—
MolotovWEAPON_MOLOTOV0x24B17070615608432—
Sticky BombWEAPON_STICKYBOMB0x2C3731D9741814745—
Proximity MineWEAPON_PROXMINE0xAB564B93-1420407917—
Snow BallWEAPON_SNOWBALL0x0787F0BB126349499—
Pipe BombWEAPON_PIPEBOMB0xBA45E8B8-1169823560—
BallWEAPON_BALL0x23C9F95C600439132—
Smoke GrenadeWEAPON_SMOKEGRENADE0xFDBC8A50-37975472—
FlareWEAPON_FLARE0x497FACC31233104067—

#Tools and misc (5)

Weapon-slot tools: fuel cans, the fire extinguisher and the metal detector.

WeaponNameHash (hex)Hash (signed int)ox_inventory ammo
Jerry CanWEAPON_PETROLCAN0x34A67B97883325847—
Hazard CanWEAPON_HAZARDCAN0xBA536372-1168940174—
Fertilizer CanWEAPON_FERTILIZERCAN0x184140A1406929569—
Fire ExtinguisherWEAPON_FIREEXTINGUISHER0x060EC506101631238—
Metal DetectorWEAPON_METALDETECTOR0xDBA2E809-610080759—

#Addon weapons and their names

Addon weapons are not in these tables. Each one declares its own name in its weapons.meta (the <Name> of its CWeaponInfo), and that name is hashed exactly the same way. If your server uses addon weapons, read the name from the pack’s meta files, not from the file names. The full install path — metadata, inventory entry and image — is in how to add a custom weapon to FiveM, and the meta file itself is explained in weapons.meta explained.

A skinned copy of a vanilla gun, like the ones exported by the weapon studio, keeps a unique name of its own so it never replaces the original. That is also what lets two differently branded versions of the same rifle exist side by side on one server. The same list with the signed and unsigned forms side by side is on FAM Tools.

#Using the list in scripts

A readable lookup table
-- Map hashes back to names for logs and UIs
local NAMES = {}
for _, name in ipairs({
    'WEAPON_PISTOL', 'WEAPON_COMBATPISTOL', 'WEAPON_CARBINERIFLE', 'WEAPON_PUMPSHOTGUN',
}) do
    NAMES[joaat(name)] = name
end

local function weaponName(hash)
    -- natives may return the signed form; normalise to unsigned first
    if hash < 0 then hash = hash + 0x100000000 end
    return NAMES[hash] or ('unknown: ' .. hash)
end
  • Store weapon names in your database and configs, never raw hashes: names survive game updates, are readable and can be searched.
  • Convert to a hash at the moment you call a native.
  • When logging, convert hashes back to names so staff can read the logs.
  • To give a weapon to a player, see giving weapons to players.
Share this guideXRedditFacebook

Questions

What is the hash of WEAPON_PISTOL?
0x1B06D571, which is 453432689 in decimal. It is the same whether you write the name in upper or lower case.
Why is my weapon hash negative?
Some natives return the hash as a signed 32-bit integer. Any hash above 0x7FFFFFFF prints as a negative number in that form; it is still the same weapon. Add 4294967296 to convert it to the unsigned form.
How do I get a weapon hash in FiveM Lua?
GetHashKey('WEAPON_NAME'), the CfxLua joaat('WEAPON_NAME') helper, or the compile-time form with backticks: `WEAPON_NAME`.
Are weapon names case-sensitive?
No. joaat lowercases the name before hashing, so WEAPON_PISTOL and weapon_pistol produce the same hash.
Where do addon weapon names come from?
From the pack’s weapons.meta — the <Name> of each weapon entry. See weapons.meta explained.
Which ammo does each weapon use in ox_inventory?
The last column of the tables lists the ammo item from ox_inventory’s default data, such as ammo-9 for 9 mm pistols and SMGs. See ammo types and items.

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

Twenty theme pairs for ox_lib and ox_inventory From $15, 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.