Docs / Scripts & MLOs / Weapon Crafting

Weapon Crafting

An illegal weapon crafting loop: source parts, assemble weapons and load ammunition at dedicated benches, all through a NUI-driven interface.

Currently QBox-only. It's built directly on qbx_core with no bridge layer yet, so it won't run on QBCore or ESX without one being added first.

Dependencies

  • qbx_core
  • ox_lib
  • ox_target: every crafting bench interaction goes through this
  • ox_inventory: parts, weapons and ammo are all real items

What's in the config

Everything lives in a single config.lua: there's no split-file setup like Chop Shop uses, since the scope here is narrower. Expect to configure bench locations, which parts/tools each weapon requires to assemble, and ammo-loading requirements.

How it's structured

Client-side logic (client/main.lua) handles the bench interactions via ox_target and reads player data through qbx_core's player-data module. The crafting UI itself is a NUI page (nui/index.html + app.js), not a native GTA menu. Server-side (server/main.lua) validates every craft and ammo load against ox_inventory so nothing can be spoofed from the client.

Installation notes

Follow the general Installation steps. Make sure ox_target, ox_inventory and qbx_core are all ensured before this resource. It has no fallback path if any of the three are missing at start; it will simply fail to initialise.

Common issues

  • Benches don't respond to targeting: confirm ox_target is actually running (not qb-target). This script only speaks ox_target's API right now.
  • Crafted weapon doesn't appear: check the item names configured for parts/weapons match real entries in your ox_inventory item list exactly.
  • NUI doesn't open: usually a resource start-order issue. This needs to start after ox_lib.