Santa & Christmas Edition36 maps, limited runlimited runShop the drop
Volume 3 · Free handbook

The Weapon Skins Handbook for FiveM
from weapons.meta to a finished skin.

Weapons on a FiveM server, chapter by chapter: how they are named and hashed, how each inventory owns them, how an add-on weapon is put together, how attachments, ammo, durability and serials work, how shops and licences restrict them, how damage is balanced for roleplay or PvP, how recoil and aiming are tuned, how weapon cheats are caught, and how skins, models and sounds are made without costing frames. Each chapter is its own page with working code and config, and links to the detailed guides.

  • 10chapters
  • 35 minreading time
  • 38natives & settings
  • 31glossary terms

Who this handbook is for

  • Server owners configuring weapons, shops and armories
  • Developers who write weapon, combat and HUD scripts
  • Modellers and texture artists building weapon packs and skins
  • Redzone and PvP servers tuning how combat plays

Updated 10 November 2026 · checked against the official docs and the inventories’ own source.

A custom weapon in game in fifteen minutes

  1. Drop the model (.ydr) and its textures (.ytd) into the stream/ folder of a resource.
  2. Create a meta/ folder holding weapons.meta, weaponarchetypes.meta and weaponanimations.meta, plus the components file if the weapon has any.
  3. Declare them in fxmanifest.lua as WEAPONINFO_FILE, WEAPON_METADATA_FILE and WEAPON_ANIMATIONS_FILE data files.
  4. Give it a name from a client script: AddTextEntry('WT_MYPISTOL', 'My Pistol').
  5. Register the weapon with your inventory: ox_inventory/data/weapons.lua, or QBCore.Shared.Weapons plus the item.
  6. ensure the resource, then hand the weapon out from the server with exports.ox_inventory:AddItem(source, 'WEAPON_MYPISTOL', 1) and test it.
10 chapters

The chapters

Each chapter is a page of its own, with its code, its tables and links to the detailed guides. Read them in order, or open the one that matches the problem in front of you.

Chapter 01How weapons work: names, hashes and giving themHow a FiveM server identifies a weapon: the WEAPON_ name, its joaat hash in hex and signed form, backtick hashes in Lua and how each framework gives one.Chapter 02Weapons in your inventory: ox_inventory, QBCore and ESXWhere ox_inventory, qb-inventory and the ESX loadout keep weapon data, with a working entry for each, plus item image folders and the metadata keys.Chapter 03Add-on weapons: meta files, weapons.meta and soundsBuild an add-on weapon resource for FiveM: folder layout, fxmanifest data_file lines, the weapons.meta fields worth editing, display names and weapon audio.Chapter 04Attachments, tints, ammo, durability and serialsWeapon components and tint indexes, MK II camos, ox_inventory attachment items, ammo item names, durability per shot and how weapon serials are generated.Chapter 05Shops, licences, armories and craftingA legal gun store and a police armory in ox_inventory shops.lua, with licence, job group, grade, currency and stock options, plus crafting and stashes.Chapter 06Damage, headshots, recoil, aiming and the weapon HUDDamage modifiers, headshot rules, a recoil loop, forced first-person aim, hiding the reticle and weapon wheel, and an ammo HUD that only updates on change.Chapter 07PvP zones, death drops and weapon anti-cheatSafe zones with ox_lib, routing buckets, death drops that keep serials, and server-side weapon checks using weaponDamageEvent, giveWeaponEvent and hooks.Chapter 08Weapon skins and texturesHow a weapon skin is made for FiveM: which DDS format to pick, what each texture size costs in memory, and the five CodeWalker steps from export to stream.Chapter 09Models, LODs and weapon pack performanceExport a weapon model from Blender with Sollumz, keep the attachment bones, set LOD triangle targets and trim the texture cost of a weapon pack on a server.Chapter 10Troubleshooting weapons and the release checklistPink or invisible weapons, NULL names, floating attachments, failed reloads and oversized-asset warnings, each with its cause, and a pack release checklist.

Two free lookup tables sit beside the chapters: every stock weapon name, hash and model and every stock attachment and its hash.

Reference

Cheat sheets

The natives, control numbers, data files and exports you will look up again.

Weapon natives

Client-side unless the row says otherwise.

NativeUse
GetSelectedPedWeapon(ped)Weapon in hand (also on the server)
GiveWeaponToPed(ped, hash, ammo, hidden, equip)Give a weapon (standalone only)
RemoveWeaponFromPed(ped, hash)Remove a weapon
GiveWeaponComponentToPed(ped, hash, comp)Attach a component
DoesWeaponTakeWeaponComponent(hash, comp)Check compatibility
SetPedWeaponTintIndex(ped, hash, i)Set a tint
SetPedWeaponLiveryColor(ped, hash, comp, tint)Colour an MK II camo
GetAmmoInClip(ped, hash) / GetAmmoInPedWeapon(ped, hash)Ammo in clip / total
SetPedAmmo(ped, hash, n) / AddAmmoToPedSet or add ammo
SetWeaponDamageModifier(hash, x)Scale a weapon’s damage
SetPedSuffersCriticalHits(ped, false)No instant headshot kills
SetWeaponsNoAutoreload(true) / SetWeaponsNoAutoswap(true)Manual reload / no auto swap
IsPedShooting(ped) / IsPlayerFreeAiming(player)Firing / aiming checks

Controls and HUD components

The numbers that DisableControlAction(0, n, true) and HideHudComponentThisFrame(n) take.

NumberWhat it is
Control 24Attack
Control 25Aim
Control 22Jump (combat roll while aiming)
Control 37Weapon wheel
Controls 140–142Melee attacks
Controls 157–165Weapon slot keys 1–9
Controls 14–17Weapon scroll
Control 0Change camera view (V)
HUD 2Weapon icon / ammo
HUD 14Reticle
HUD 19 / 20Weapon wheel / wheel stats

Weapon data files

Every data_file type an add-on weapon can declare.

data_fileFile
WEAPONINFO_FILEweapons.meta
WEAPON_METADATA_FILEweaponarchetypes.meta
WEAPON_ANIMATIONS_FILEweaponanimations.meta
WEAPONCOMPONENTSINFO_FILEweaponcomponents.meta
PED_PERSONALITY_FILEpedpersonality.meta
AUDIO_WAVEPACK / AUDIO_GAMEDATA / AUDIO_SOUNDDATACustom weapon audio

ox_inventory for weapons

Server exports unless the row says otherwise.

CallUse
AddItem(src, 'WEAPON_X', 1, meta)Give a weapon with metadata
RemoveItem(src, 'WEAPON_X', 1)Take it
Search(src, 'count', 'WEAPON_X')Does the player own it
SetMetadata(inv, slot, meta)Change serial, durability, components
CustomDrop(prefix, items, coords)Drop items on the ground
RegisterShop(type, data) / RegisterStash(...)Shops and stashes from your resource
registerHook(event, fn, options)Enforce rules on create, swap, buy, use
ox_inventory:currentWeapon (client event)The equipped weapon changed
Reference

Glossary

Every term this handbook uses, in one line each.

Add-on weapon
A new WEAPON_… that brings its own model and meta files and exists alongside the stock weapons.
Ammo type
AMMO_PISTOL, AMMO_RIFLE and so on. Weapons with the same type draw from one ammo pool.
Ammo item
An inventory item, ammo-9 for example, that reloads weapons.
Archetype
The weaponarchetypes.meta entry that ties a model to its texture dictionary.
Attachment
A weapon component: suppressor, scope, flashlight, grip, magazine or skin.
BC1 / BC7
Compressed texture formats. BC1 is the smallest; BC7 is the high-quality one.
Bone
A named attachment point in the model, WAPSupp or WAPScop for example.
Camo
An MK II livery component, coloured with SetPedWeaponLiveryColor.
CodeWalker
The GTA V file viewer and editor used on .ytd and map files.
Component
A part attached to a weapon by its hash, e.g. COMPONENT_AT_AR_SUPP.
Damage falloff
The drop in damage over distance, set in weapons.meta.
DDS
The file format of the textures inside a .ytd dictionary.
Durability
Weapon wear in ox_inventory: 100 when new, broken at 0.
Hash
The number the game uses in place of a name: joaat of the lowercase name.
Headshot modifier
HeadShotDamageModifierPlayer, the multiplier applied to headshot damage.
joaat
Jenkins one-at-a-time, the hash function GTA V applies to names.
Loadout
The default weapon storage in ESX, kept apart from items.
LOD
Level of detail: the simpler models drawn at a distance.
Metadata
Per-item data in ox_inventory: serial, durability, ammo, components.
Mipmaps
Smaller copies of a texture used at a distance; they add about a third to its memory.
MK II
The upgraded GTA Online weapons, which have more tints and camo liveries.
Oversized asset
A streamed file that takes more than 16 MiB of memory and triggers a warning.
Recoil
The camera kick after a shot: visual only in weapons.meta, real when a script moves the camera.
Replace
Streaming files under stock names so an existing weapon changes for everyone.
Reticle
The crosshair, HUD component 14.
Serial
The registration number ox_inventory gives to weapons that use ammo.
Sollumz
The Blender add-on that imports and exports GTA V models.
Tint
A colour index for the whole weapon, set with SetPedWeaponTintIndex.
weapons.meta
The file that defines a weapon’s damage, ammo, fire rate and flags.
YDR
A drawable model file; weapons and their components are YDRs.
YTD
A texture dictionary, which is where a weapon skin lives.
Reference

Questions server owners ask

How do I add custom weapons to a FiveM server?
Stream the model and its textures, add weapons.meta, weaponarchetypes.meta and weaponanimations.meta with their data_file lines, register the label with AddTextEntry, add the weapon to your inventory and ensure the resource. The add-on weapons chapter has the full layout.
What is the difference between a replace and an add-on weapon?
A replace streams files under stock names, so the existing weapon changes for everyone. An add-on is a new weapon with a name and meta files of its own.
How do I give a weapon to a player?
From the server, through the inventory: exports.ox_inventory:AddItem(source, 'WEAPON_PISTOL', 1), AddItem on QBCore, or xPlayer.addWeapon on ESX.
Why is my weapon pink?
The model cannot find its textures. Either the .ytd is missing, misnamed or not streamed, or txdName does not match.
How do I change weapon damage?
For quick tuning, call SetWeaponDamageModifier(hash, multiplier) in a client script. For a permanent value per weapon, edit Damage in weapons.meta.
How do I stop one-shot headshots?
Call SetPedSuffersCriticalHits(PlayerPedId(), false) after every spawn.
How do weapon serials work in ox_inventory?
A weapon that uses ammo gets a registered owner and a serial. Pass serial = 'POL' to set a custom prefix, or registered = false for a weapon with no serial.
How do I add attachments on ox_inventory?
Define the component items under Components in data/weapons.lua. Players attach them from the weapon’s context menu.
How do I add a weapon licence?
Put license = 'weapon' on the shop item. ox_inventory then checks the framework’s licence storage.
How do I make a police armory?
Create an ox_inventory shop with groups = { police = 0 }, a grade on the restricted items and metadata = { registered = true }.
What texture size should weapon skins use?
2048 for the main texture of a hero weapon, 1024 for most weapons and 512 for small parts, always compressed and with mipmaps.
How do I add recoil?
While the player is armed and IsPedShooting is true, raise the camera with SetGameplayCamRelativePitch, using a small value per weapon.
How do I force first person when aiming?
Store the current view mode when the player starts to aim, call SetFollowPedCamViewMode(4), and restore the stored mode when they stop.
How do I disable the weapon wheel?
Disable control 37, hide HUD components 19 and 20 on every frame, and call SetWeaponsNoAutoswap(true).
How do I stop weapon cheaters?
Give weapons from the server only, compare what each player holds with what they own, and inspect weaponDamageEvent, giveWeaponEvent and explosionEvent.
Which inventory is best for weapons?
ox_inventory has the most weapon features: serials, durability, attachments, shops, crafting and hooks.
How do I make a weapon skin?
Edit the diffuse texture in the weapon’s .ytd at the same size, save it as DDS with mipmaps, replace it in CodeWalker and stream it. The weapon skin studio does the same job in a browser.
Reference

Official references

The primary sources behind this handbook. Where they disagree with it, they win.

Official documentation

Inventories and frameworks

Community