PiTyUs.Hire me

Assets & UI

Custom FiveM weapon skins — how they actually work

How GTA V weapon models and textures work, tints vs add-on weapons, why custom guns render white, and wiring skins into ox_inventory as real items.

Updated 8 min readBy PiTyUs · FiveM developer

How a GTA V weapon is put together

A weapon in GTA V is a fragment model (`.yft`) plus one or more texture dictionaries (`.ytd`), described by metadata files that tell the game its name, its stats, its components and how it appears in the inventory. A skin changes the textures; an add-on weapon changes everything.

FileRole
weapon_xxx.yftThe weapon model, including attachment points and moving parts
weapon_xxx.ytdThe texture dictionary — diffuse, normal, specular and any glow maps
weapons.metaStats, damage, ammo type, model name, component list
weaponcomponents.metaScopes, suppressors, magazines, grips
weaponarchetypes.metaHow the model maps to the archetype system
loadout / pickupsMakes the weapon obtainable and pickup-able in the world

Tints vs add-on weapons

There are two ways to give players a different-looking gun, and they have very different costs.

Weapon tintAdd-on weapon
What it isA palette swap the game already supportsA completely new weapon entry
Stream costAlmost noneA full model and texture set per weapon
InventorySame item, a tint indexA separate item with its own name and image
FlexibilityLimited to the tint paletteAny artwork you want
Best forCheap variety on standard weaponsSignature weapons, gang guns, donator rewards
Applying a tint — the cheap optionlua
local weapon = GetSelectedPedWeapon(cache.ped)
SetPedWeaponTintIndex(cache.ped, weapon, 3)

Most "weapon skin" packs sold for FiveM are actually add-on weapons: a copy of the base model with a new texture and a new name, so the skinned version can exist alongside the original as a separate inventory item.

01Streaming a custom weapon

The manifest for an add-on weapon resourcelua
fx_version 'cerulean'
game 'gta5'

files {
  'meta/weapons.meta',
  'meta/weaponcomponents.meta',
  'meta/weaponarchetypes.meta',
}

data_file 'WEAPONINFO_FILE'       'meta/weapons.meta'
data_file 'WEAPON_METADATA_FILE'  'meta/weaponarchetypes.meta'
data_file 'WEAPON_COMPONENTS_FILE' 'meta/weaponcomponents.meta'
  1. Put the yft and ytd files in `stream/`.
  2. Declare every meta file in `files` and register it with the matching `data_file` type.
  3. Give the weapon a unique name — collisions with another pack silently break both.
  4. Restart the server fully. Weapon metadata is only parsed at startup.
  5. Test spawning it, aiming, reloading and every attachment before you give it to players.

Why custom weapons look white or glowing

This trips up nearly everyone who edits a weapon texture for the first time. Many weapon models include emissive shells — extra geometry that draws light on top of the body, using shaders like `emissivestrong`. The glow mask usually lives in the texture's alpha channel, not its colour.

  • If you paint over the diffuse of an emissive shell, the whole gun lights up white.
  • If you flatten the alpha channel while re-saving a YTD, the glow mask disappears or covers everything.
  • Some models reuse the opaque body texture on an additive shell — editing it doubles the body and blows out the highlights.
  • The fix is to identify which textures belong to glow geometry and leave their alpha intact, or edit only the non-emissive diffuse maps.

The practical rule: open the model, find which drawables use emissive shaders, and treat their textures as off-limits unless you specifically want to change the glow.

Wiring skins into ox_inventory

A streamed weapon that the inventory does not know about shows as a missing item. ox_inventory keeps weapons in its own weapons file, and every entry needs a matching square image.

An ox_inventory weapon entrylua
['WEAPON_PTY_STORMBORN'] = {
  label = 'Stormborn Rifle',
  weight = 3200,
  durability = 0.03,
  ammoname = 'ammo-rifle',
  components = { 'at_scope_medium', 'at_suppressor_light' },
},
  • The key must exactly match the weapon name in weapons.meta, including case.
  • Item images go in ox_inventory's images folder as PNG, named in lowercase after the item — 512×512 with a transparent background is the safe standard.
  • Set a sensible weight. A rifle that weighs the same as a pistol makes the whole weight system feel arbitrary.
  • If you use a different inventory, the concept is identical: an item definition plus an image.

Keeping the catalogue sane

  • Every add-on weapon is permanent client memory, loaded whether anyone owns it or not.
  • Twenty to forty custom weapons is a comfortable catalogue. Two hundred is a memory problem you will not diagnose easily.
  • Prefer a small set of high-quality signature weapons over every free pack you can find.
  • Audit any free weapon pack the same way you audit any other resource — check for scripts you did not expect.

Frequently asked questions

How do I add custom weapon skins to FiveM?

Either apply a weapon tint, which the game supports natively and costs almost nothing, or ship an add-on weapon: the yft and ytd in a stream folder, weapons.meta and weaponcomponents.meta registered with data_file, and a matching inventory item with an image.

Why does my custom FiveM weapon look white?

Almost always an emissive shell. Many weapon models include extra glow geometry whose mask lives in the texture alpha. Painting over that diffuse, or flattening the alpha while re-saving the YTD, makes the whole weapon render as a bright white blob.

Do custom weapons work with ox_inventory?

Yes. Add an entry to ox_inventory's weapons file keyed exactly by the weapon name from weapons.meta, and drop a square PNG into the images folder named after the item in lowercase.

How many custom weapons can a FiveM server have?

There is no hard limit, but every add-on weapon costs client memory permanently. Twenty to forty is comfortable; large catalogues contribute to crashes on join for players with less memory.

Need this built, not just explained?

Ten years of FiveM work, from Lua to NUI

Custom resources, React NUI, ESX / QBCore / Qbox integration, OneSync performance audits and security reviews — plus the websites and SEO around your server brand.

Related guides