Skip to content

JDB-NET Crafting

FiveM crafting resource for Qbox with cw-rep skill integration, static and placeable crafting benches.

Features

  • cw-rep integration – Different skills per recipe group, level gating for recipes

  • Recipe groups – Configurable groups (e.g. weapons, ammo) with their own skills

  • Static benches – Spawn props or use existing world locations

  • Placeable benches – Buy item from shop, place in world or interiors, pickup (owner only)

  • Material Design 3 NUI – Configurable accent colour, consistent with JDB-NET styling

Dependencies

  • ox_lib

  • ox_target

  • ox_inventory

  • oxmysql

  • qbx_core

  • cw-rep

Installation

  1. Ensure the resource folder is named jdbnet-crafting.
  2. Add the SQL table (optional – created automatically on first run):
-- See sql/placed_benches.sql
  1. Add to server.cfg:
ensure jdbnet-crafting

Configuration

Edit shared/config.lua:

  • AccentColour – NUI accent (e.g. #3b82f6)

  • Locale – Locale file name without extension (e.g. 'en' loads locales/en.json)

  • PlaceableBenches – Map of item names to bench types (e.g. ['crafting_bench_basic'] = 'workbench_basic')

  • RecipeGroups – Groups, skills, recipes with ingredients and minLevel. For display order: use recipeOrder = {'id1','id2','id3'} with hash format, or define recipes as an array: recipes = { { id = 'lockpick', ... }, { id = 'bandage', ... } }

  • BenchTypes – Bench definitions and which groups they can craft

  • StaticBenches – World bench positions

Adding Placeable Bench Items

You can have multiple placeable bench types. Add each to ox_inventory/data/items.lua and map them in PlaceableBenches in config:

['crafting_bench_basic'] = {
    label = 'Basic Crafting Bench',
    weight = 5000,
    stack = false,
    close = true,
    description = 'Place a basic crafting bench.',
    server = { export = 'jdbnet-crafting.UsePlaceableBench' },
},

['crafting_bench_advanced'] = {
    label = 'Advanced Crafting Bench',
    weight = 5000,
    stack = false,
    close = true,
    description = 'Place an advanced crafting bench.',
    server = { export = 'jdbnet-crafting.UsePlaceableBench' },
},

If your resource folder has a different name, use that instead of jdbnet-crafting in the export. Add each item to your shop script so players can buy them.

cw-rep Skills

Add the skills used in RecipeGroups to your cw-rep config, for example:

weapons_crafting = {
    icon = 'fas fa-gun',
    label = 'Weapons Crafting',
},
ammo_crafting = {
    icon = 'fas fa-bullseye',
    label = 'Ammo Crafting',
},

Locales

Translations live in locales/en.json. Customers can edit this file to customize UI text, notifications, and labels. Set Locale = 'en' (or your language code) in shared/config.lua to select the file.