ATY Scripts Logo
ATY Scripts/Docs/Weapon Editor/The workshop

The workshop

The workshop

The workshop is the player-facing screen. It opens on the weapon in their hands, at a workbench they are allowed to use.

The weapon is shown in 3D. Drag with the left mouse button to turn it, wheel to zoom, and Reset view puts it back.

What it shows

The panel opens with the weapon's current state, not a blank slate — the design it already carries, the pattern, the tint, the attachments fitted, and its serial number. If a player wants to see what is on a weapon, or take something off, opening the workshop is how.

A weapon with no design shows No skin applied and offers Create a skin, which opens the Skin Studio.

A weapon that already has one offers Edit and Remove. Removing takes the design off the weapon; the design itself stays in the player's library and can be put back on any weapon later.

The tabs

Three, and the middle one only appears when it applies.

Paint

The weapon's tint — the eight vanilla livery colours: Black, Green, Gold, Pink, Army, LSPD, Orange, Platinum.

Pattern

Only on Mk II weapons, and only those with camo components. An empty tab reads as broken; its absence correctly says the weapon takes no patterns.

While a pattern is selected, the colour chosen on the Paint tab is applied as the livery colour. Tapping the same pattern again removes it.

Attachment

Flashlights, suppressors, scopes, grips and extended magazines — only the ones the equipped weapon actually accepts. A weapon that takes none says so rather than showing an empty list.

Some attachments change how the weapon performs:

Attachment Effect When
Suppressors −10% damage Immediately
Grip −15% horizontal recoil Immediately
Extended magazines Larger clip After a server restart — clip size is a weapon-meta field

Applying changes

The panel counts real pending changes, not clicks. Apply commits them; Discard throws them away. With nothing changed it says so instead of offering a button that would do nothing.

Every change goes to the server, which validates it, checks the workbench rule again, runs your canCustomize and priceFor hooks, and writes an audit row.

Serial numbers

Every weapon instance carries a serial. It is stored in aty_gunsmith_instances and written into the item's own metadata, so it travels with the weapon: as metadata.serial on ox_inventory, as info.serial on qb.

Modifying a weapon never mints a new serial. The serial is treated as the weapon's identity — when a stored record has no owner it is claimed rather than replaced, and when a weapon changes hands only the owner field is updated. The design, attachments and kill counter follow the weapon.

Existing inventory metadata — ammo, durability, your framework's own fields — is preserved, and left untouched entirely when the inventory cannot be read.

Every change lands in aty_gunsmith_audit, which is what makes police tracking workable.

A weapon losing its serial or its attachments after going into a pocket is not expected behaviour. If you see it, run `/gunsmithslots ` from the server console — it shows how many copies of that weapon the inventory holds and which serial each one carries, which is what separates a metadata write problem from a duplicate-item problem.

Kill counter

Each instance carries a StatTrak-style counter, incremented through the addKill export. It is part of the weapon record, so it survives trades along with the serial.

See also

  • Skin Studio — designing the skin itself
  • Who sees your skin — what other players see
  • Weapon catalogue — attachments and coverage
ATY Scripts LogoATY SCRIPTS

Des scripts FiveM hautement optimisés pour QBCore & ESX. Performance maximale, code précis, zéro lag.

Rejoindre la communauté

Partenaire

Partenaire officiel de Tebex. Paiement sécurisé et intégration Cfx.re Keymaster.

Mentions légales

Non affilié à Rockstar Games, Cfx.re, FiveM ou Take-Two Interactive. Les achats sont soumis aux CGU de Tebex.

© 2026 ATY SCRIPTS. Tous droits réservés.