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
- Drop the model (
.ydr) and its textures (.ytd) into thestream/folder of a resource. - Create a
meta/folder holdingweapons.meta,weaponarchetypes.metaandweaponanimations.meta, plus the components file if the weapon has any. - Declare them in
fxmanifest.luaasWEAPONINFO_FILE,WEAPON_METADATA_FILEandWEAPON_ANIMATIONS_FILEdata files. - Give it a name from a client script:
AddTextEntry('WT_MYPISTOL', 'My Pistol'). - Register the weapon with your inventory:
ox_inventory/data/weapons.lua, orQBCore.Shared.Weaponsplus the item. ensurethe resource, then hand the weapon out from the server withexports.ox_inventory:AddItem(source, 'WEAPON_MYPISTOL', 1)and test it.
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.
Two free lookup tables sit beside the chapters: every stock weapon name, hash and model and every stock attachment and its hash.
Cheat sheets
The natives, control numbers, data files and exports you will look up again.
Weapon natives
Client-side unless the row says otherwise.
| Native | Use |
|---|---|
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) / AddAmmoToPed | Set 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.
| Number | What it is |
|---|---|
| Control 24 | Attack |
| Control 25 | Aim |
| Control 22 | Jump (combat roll while aiming) |
| Control 37 | Weapon wheel |
| Controls 140–142 | Melee attacks |
| Controls 157–165 | Weapon slot keys 1–9 |
| Controls 14–17 | Weapon scroll |
| Control 0 | Change camera view (V) |
| HUD 2 | Weapon icon / ammo |
| HUD 14 | Reticle |
| HUD 19 / 20 | Weapon wheel / wheel stats |
Weapon data files
Every data_file type an add-on weapon can declare.
| data_file | File |
|---|---|
WEAPONINFO_FILE | weapons.meta |
WEAPON_METADATA_FILE | weaponarchetypes.meta |
WEAPON_ANIMATIONS_FILE | weaponanimations.meta |
WEAPONCOMPONENTSINFO_FILE | weaponcomponents.meta |
PED_PERSONALITY_FILE | pedpersonality.meta |
AUDIO_WAVEPACK / AUDIO_GAMEDATA / AUDIO_SOUNDDATA | Custom weapon audio |
ox_inventory for weapons
Server exports unless the row says otherwise.
| Call | Use |
|---|---|
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 |
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_RIFLEand so on. Weapons with the same type draw from one ammo pool.- Ammo item
- An inventory item,
ammo-9for 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,
WAPSupporWAPScopfor example. - Camo
- An MK II livery component, coloured with
SetPedWeaponLiveryColor. - CodeWalker
- The GTA V file viewer and editor used on
.ytdand 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
.ytddictionary. - 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.
Questions server owners ask
How do I add custom weapons to a FiveM server?
What is the difference between a replace and an add-on weapon?
How do I give a weapon to a player?
exports.ox_inventory:AddItem(source, 'WEAPON_PISTOL', 1), AddItem on QBCore, or xPlayer.addWeapon on ESX.Why is my weapon pink?
.ytd is missing, misnamed or not streamed, or txdName does not match.How do I change weapon damage?
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?
SetPedSuffersCriticalHits(PlayerPedId(), false) after every spawn.How do weapon serials work in ox_inventory?
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?
Components in data/weapons.lua. Players attach them from the weapon’s context menu.How do I add a weapon licence?
license = 'weapon' on the shop item. ox_inventory then checks the framework’s licence storage.How do I make a police armory?
groups = { police = 0 }, a grade on the restricted items and metadata = { registered = true }.What texture size should weapon skins use?
How do I add recoil?
IsPedShooting is true, raise the camera with SetGameplayCamRelativePitch, using a small value per weapon.How do I force first person when aiming?
SetFollowPedCamViewMode(4), and restore the stored mode when they stop.How do I disable the weapon wheel?
SetWeaponsNoAutoswap(true).How do I stop weapon cheaters?
weaponDamageEvent, giveWeaponEvent and explosionEvent.Which inventory is best for weapons?
How do I make a weapon skin?
.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.Official references
The primary sources behind this handbook. Where they disagree with it, they win.
Official documentation
- Natives reference — Every weapon native
- Resource manifest — data_file and files
- Server commands — sv_pureLevel and more
- Net game events — Game events you can block
Inventories and frameworks
- Overextended docs — ox_inventory weapons, shops, hooks
- QBCore documentation — Shared items and weapons
- ESX documentation — Loadout and items
- Qbox documentation — qbx_core with ox_inventory
Community
- Cfx.re forum — Releases and help
The handbook series for FiveM
Four free handbooks, one per part of the job. Read them in any order.
Put your own artwork on a weapon
Upload an image, pick a model from the library and the studio places it on the real 3D mesh, then exports a drop-in resource. The first weapon on a new account is free.