Every GTA V weapon name and hash, for FiveM scripts
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.

#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.
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 (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.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Pistol | WEAPON_PISTOL | 0x1B06D571 | 453432689 | ammo-9 |
| Pistol MK2 | WEAPON_PISTOL_MK2 | 0xBFE256D4 | -1075685676 | ammo-9 |
| Combat Pistol | WEAPON_COMBATPISTOL | 0x5EF9FEC4 | 1593441988 | ammo-9 |
| AP Pistol | WEAPON_APPISTOL | 0x22D8FE39 | 584646201 | ammo-9 |
| Pistol .50 | WEAPON_PISTOL50 | 0x99AEEB3B | -1716589765 | ammo-50 |
| SNS Pistol | WEAPON_SNSPISTOL | 0xBFD21232 | -1076751822 | ammo-45 |
| SNS Pistol MK2 | WEAPON_SNSPISTOL_MK2 | 0x88374054 | -2009644972 | ammo-45 |
| Heavy Pistol | WEAPON_HEAVYPISTOL | 0xD205520E | -771403250 | ammo-45 |
| Vintage Pistol | WEAPON_VINTAGEPISTOL | 0x083839C4 | 137902532 | ammo-9 |
| Marksman Pistol | WEAPON_MARKSMANPISTOL | 0xDC4DB296 | -598887786 | ammo-22 |
| Revolver | WEAPON_REVOLVER | 0xC1B3C3D1 | -1045183535 | ammo-44 |
| Revolver MK2 | WEAPON_REVOLVER_MK2 | 0xCB96392F | -879347409 | ammo-44 |
| Double Action Revolver | WEAPON_DOUBLEACTION | 0x97EA20B8 | -1746263880 | ammo-38 |
| Ceramic Pistol | WEAPON_CERAMICPISTOL | 0x2B5EF5EC | 727643628 | ammo-9 |
| Navy Revolver | WEAPON_NAVYREVOLVER | 0x917F6C8C | -1853920116 | ammo-44 |
| Perico Pistol | WEAPON_GADGETPISTOL | 0x57A4368C | 1470379660 | ammo-9 |
| WM 29 Pistol | WEAPON_PISTOLXM3 | 0x1BC4FDB9 | 465894841 | ammo-9 |
| Tazer | WEAPON_STUNGUN | 0x3656C8C1 | 911657153 | — |
| Flare Gun | WEAPON_FLAREGUN | 0x47757124 | 1198879012 | ammo-flare |
| Up-n-Atomizer | WEAPON_RAYPISTOL | 0xAF3696A1 | -1355376991 | — |
#Submachine guns (8)
Compact automatic weapons. WEAPON_TECPISTOL is the Tactical SMG despite its internal name.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Micro SMG | WEAPON_MICROSMG | 0x13532244 | 324215364 | ammo-45 |
| SMG | WEAPON_SMG | 0x2BE6766B | 736523883 | ammo-9 |
| SMG Mk2 | WEAPON_SMG_MK2 | 0x78A97CD0 | 2024373456 | ammo-9 |
| Assault SMG | WEAPON_ASSAULTSMG | 0xEFE7E2DF | -270015777 | ammo-rifle |
| Combat PDW | WEAPON_COMBATPDW | 0x0A3D4D34 | 171789620 | ammo-9 |
| Machine Pistol | WEAPON_MACHINEPISTOL | 0xDB1AA450 | -619010992 | ammo-9 |
| Mini SMG | WEAPON_MINISMG | 0xBD248B55 | -1121678507 | ammo-9 |
| Tactical SMG | WEAPON_TECPISTOL | 0x14E5AFD5 | 350597077 | ammo-9 |
#Assault rifles (14)
Rifles and carbines, the core of most police and gang arsenals.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Assault Rifle | WEAPON_ASSAULTRIFLE | 0xBFEFFF6D | -1074790547 | ammo-rifle2 |
| Assault Rifle MK2 | WEAPON_ASSAULTRIFLE_MK2 | 0x394F415C | 961495388 | ammo-rifle2 |
| Carbine Rifle | WEAPON_CARBINERIFLE | 0x83BF0278 | -2084633992 | ammo-rifle |
| Carbine Rifle MK2 | WEAPON_CARBINERIFLE_MK2 | 0xFAD1F1C9 | -86904375 | ammo-rifle |
| Advanced Rifle | WEAPON_ADVANCEDRIFLE | 0xAF113F99 | -1357824103 | ammo-rifle |
| Special Carbine | WEAPON_SPECIALCARBINE | 0xC0A3098D | -1063057011 | ammo-rifle |
| Special Carbine MK2 | WEAPON_SPECIALCARBINE_MK2 | 0x969C3D67 | -1768145561 | ammo-rifle |
| Bullpup Rifle | WEAPON_BULLPUPRIFLE | 0x7F229F94 | 2132975508 | ammo-rifle |
| Bullpup Rifle MK2 | WEAPON_BULLPUPRIFLE_MK2 | 0x84D6FAFD | -2066285827 | ammo-rifle |
| Compact Rifle | WEAPON_COMPACTRIFLE | 0x624FE830 | 1649403952 | ammo-rifle2 |
| Military Rifle | WEAPON_MILITARYRIFLE | 0x9D1F17E6 | -1658906650 | ammo-rifle |
| Heavy Rifle | WEAPON_HEAVYRIFLE | 0xC78D71B4 | -947031628 | ammo-rifle |
| Tactical Rifle | WEAPON_TACTICALRIFLE | 0xD1D5F52B | -774507221 | ammo-rifle |
| Battle Rifle | WEAPON_BATTLERIFLE | 0x72B66B11 | 1924557585 | ammo-rifle2 |
#Shotguns (10)
Pump, semi-automatic and break-action shotguns, plus the musket.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Pump Shotgun | WEAPON_PUMPSHOTGUN | 0x1D073A89 | 487013001 | ammo-shotgun |
| Pump Shotgun MK2 | WEAPON_PUMPSHOTGUN_MK2 | 0x555AF99A | 1432025498 | ammo-shotgun |
| Sawn Off Shotgun | WEAPON_SAWNOFFSHOTGUN | 0x7846A318 | 2017895192 | ammo-shotgun |
| Assault Shotgun | WEAPON_ASSAULTSHOTGUN | 0xE284C527 | -494615257 | ammo-shotgun |
| Bullpup Shotgun | WEAPON_BULLPUPSHOTGUN | 0x9D61E50F | -1654528753 | ammo-shotgun |
| Musket | WEAPON_MUSKET | 0xA89CB99E | -1466123874 | ammo-musket |
| Heavy Shotgun | WEAPON_HEAVYSHOTGUN | 0x3AABBBAA | 984333226 | ammo-shotgun |
| Double Barrel Shotgun | WEAPON_DBSHOTGUN | 0xEF951FBB | -275439685 | ammo-shotgun |
| Sweeper Shotgun | WEAPON_AUTOSHOTGUN | 0x12E82D3D | 317205821 | ammo-shotgun |
| Combat Shotgun | WEAPON_COMBATSHOTGUN | 0x05A96BA4 | 94989220 | ammo-shotgun |
#Machine guns (5)
Belt-fed and drum-fed automatic weapons.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Machine Gun | WEAPON_MG | 0x9D07F764 | -1660422300 | ammo-rifle2 |
| Combat MG | WEAPON_COMBATMG | 0x7FD62962 | 2144741730 | ammo-rifle |
| Combat MG MK2 | WEAPON_COMBATMG_MK2 | 0xDBBD7280 | -608341376 | ammo-rifle2 |
| Gusenberg | WEAPON_GUSENBERG | 0x61012683 | 1627465347 | ammo-45 |
| Unholy Hellbringer | WEAPON_RAYCARBINE | 0x476BF155 | 1198256469 | ammo-laser |
#Sniper and marksman rifles (6)
Long-range rifles; most accept scopes as components.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Sniper Rifle | WEAPON_SNIPERRIFLE | 0x05FC3C11 | 100416529 | ammo-sniper |
| Heavy Sniper | WEAPON_HEAVYSNIPER | 0x0C472FE2 | 205991906 | ammo-heavysniper |
| Heavy Sniper MK2 | WEAPON_HEAVYSNIPER_MK2 | 0x0A914799 | 177293209 | ammo-heavysniper |
| Marksman Rifle | WEAPON_MARKSMANRIFLE | 0xC734385A | -952879014 | ammo-sniper |
| Marksman Rifle MK2 | WEAPON_MARKSMANRIFLE_MK2 | 0x6A6C02E0 | 1785463520 | ammo-sniper |
| Precision Rifle | WEAPON_PRECISIONRIFLE | 0x6E7DDDEC | 1853742572 | ammo-sniper |
#Heavy weapons (11)
Launchers, miniguns and the railguns. Most servers restrict or remove these.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| RPG | WEAPON_RPG | 0xB1CA77B1 | -1312131151 | ammo-rocket |
| Grenade Launcher | WEAPON_GRENADELAUNCHER | 0xA284510B | -1568386805 | ammo-grenade |
| Minigun | WEAPON_MINIGUN | 0x42BF8A85 | 1119849093 | ammo-rifle2 |
| Firework Launcher | WEAPON_FIREWORK | 0x7F7497E5 | 2138347493 | ammo-firework |
| Railgun | WEAPON_RAILGUN | 0x6D544C99 | 1834241177 | ammo-railgun |
| Railgun XM3 | WEAPON_RAILGUNXM3 | 0xFEA23564 | -22923932 | ammo-railgun |
| Homing Launcher | WEAPON_HOMINGLAUNCHER | 0x63AB0442 | 1672152130 | ammo-rocket |
| Compact Grenade Launcher | WEAPON_COMPACTLAUNCHER | 0x0781FE4A | 125959754 | ammo-grenade |
| Widowmaker | WEAPON_RAYMINIGUN | 0xB62D1F67 | -1238556825 | ammo-laser |
| Compact EMP Launcher | WEAPON_EMPLAUNCHER | 0xDB26713A | -618237638 | ammo-emp |
| Snowball Launcher | WEAPON_SNOWLAUNCHER | 0x03BF5575 | 62870901 | WEAPON_SNOWBALL |
#Melee (18)
Melee weapons carry no ammo; WEAPON_UNARMED (fists, 0xA2719263) is not listed as an item.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Knife | WEAPON_KNIFE | 0x99B507EA | -1716189206 | — |
| Nightstick | WEAPON_NIGHTSTICK | 0x678B81B1 | 1737195953 | — |
| Hammer | WEAPON_HAMMER | 0x4E875F73 | 1317494643 | — |
| Bat | WEAPON_BAT | 0x958A4A8F | -1786099057 | — |
| Crowbar | WEAPON_CROWBAR | 0x84BD7BFD | -2067956739 | — |
| Golf Club | WEAPON_GOLFCLUB | 0x440E4788 | 1141786504 | — |
| Bottle | WEAPON_BOTTLE | 0xF9E6AA4B | -102323637 | — |
| Dagger | WEAPON_DAGGER | 0x92A27487 | -1834847097 | — |
| Hatchet | WEAPON_HATCHET | 0xF9DCBF2D | -102973651 | — |
| Knuckle Dusters | WEAPON_KNUCKLE | 0xD8DF3C3C | -656458692 | — |
| Machete | WEAPON_MACHETE | 0xDD5DF8D9 | -581044007 | — |
| Flashlight | WEAPON_FLASHLIGHT | 0x8BB05FD7 | -1951375401 | — |
| Switchblade | WEAPON_SWITCHBLADE | 0xDFE37640 | -538741184 | — |
| Pool Cue | WEAPON_POOLCUE | 0x94117305 | -1810795771 | — |
| Wrench | WEAPON_WRENCH | 0x19044EE0 | 419712736 | — |
| Battle Axe | WEAPON_BATTLEAXE | 0xCD274149 | -853065399 | — |
| Stone Hatchet | WEAPON_STONE_HATCHET | 0x3813FC08 | 940833800 | — |
| Candy Cane | WEAPON_CANDYCANE | 0x6589186A | 1703483498 | — |
#Throwables (11)
Grenades, gas, explosives and harmless throwables such as the ball and snowball.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Grenade | WEAPON_GRENADE | 0x93E220BD | -1813897027 | — |
| BZ Gas | WEAPON_BZGAS | 0xA0973D5E | -1600701090 | — |
| Tear Gas | WEAPON_TEARGAS | 0x26CCE1DE | 650961374 | — |
| Molotov | WEAPON_MOLOTOV | 0x24B17070 | 615608432 | — |
| Sticky Bomb | WEAPON_STICKYBOMB | 0x2C3731D9 | 741814745 | — |
| Proximity Mine | WEAPON_PROXMINE | 0xAB564B93 | -1420407917 | — |
| Snow Ball | WEAPON_SNOWBALL | 0x0787F0BB | 126349499 | — |
| Pipe Bomb | WEAPON_PIPEBOMB | 0xBA45E8B8 | -1169823560 | — |
| Ball | WEAPON_BALL | 0x23C9F95C | 600439132 | — |
| Smoke Grenade | WEAPON_SMOKEGRENADE | 0xFDBC8A50 | -37975472 | — |
| Flare | WEAPON_FLARE | 0x497FACC3 | 1233104067 | — |
#Tools and misc (5)
Weapon-slot tools: fuel cans, the fire extinguisher and the metal detector.
| Weapon | Name | Hash (hex) | Hash (signed int) | ox_inventory ammo |
|---|---|---|---|---|
| Jerry Can | WEAPON_PETROLCAN | 0x34A67B97 | 883325847 | — |
| Hazard Can | WEAPON_HAZARDCAN | 0xBA536372 | -1168940174 | — |
| Fertilizer Can | WEAPON_FERTILIZERCAN | 0x184140A1 | 406929569 | — |
| Fire Extinguisher | WEAPON_FIREEXTINGUISHER | 0x060EC506 | 101631238 | — |
| Metal Detector | WEAPON_METALDETECTOR | 0xDBA2E809 | -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
-- 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.
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?
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?
WEAPON_PISTOL and weapon_pistol produce the same hash.Where do addon weapon names come from?
<Name> of each weapon entry. See weapons.meta explained.Which ammo does each weapon use in ox_inventory?
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.
- The 100 blip colour indexesEvery index SetBlipColour accepts, with the hex value the radar actually draws.
- All 921 vehicle spawn namesEvery vanilla model with a picture, its display name, its class and the hash CreateVehicle takes.
- 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.