Skip to content

ABUGIZA/F4-Crafting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F4 Crafting

Professional crafting system for FiveM / Qbox with UI and level progression.

Description

F4 Crafting is a modular crafting system for FiveM servers using the QBCore framework. It provides a polished UI, level progression, XP rewards, and configurable crafting recipes. Designed to work with ox_inventory or qb-inventory and integrate with ox_lib, oxmysql, interact, and object_gizmo.

Features

  • Interactive crafting UI with stations
  • Item level progression and XP rewards
  • Configurable crafting recipes and material requirements
  • Support for ox_inventory and qb-inventory
  • Integration with ox_lib, oxmysql, interact and object_gizmo

Screenshots

Main UI - Item selection and crafting Main crafting UI — item selection, crafting preview and material requirements.

Alternate UI view Alternate view highlighting materials and controls.

In-game Workbench / Crafting Table Example in-game crafting table / workbench.

Requirements

Installation

  1. Execute f4_Crafting.sql in your database
  2. Add to server.cfg:
ensure F4-Crafting

Configuration

Inventory System — edit shared/shared.lua:

F4.img = "ox_inventory"  -- "ox_inventory" or "qb-inventory"

Add crafting items — example:

F4.CraftingItems = {
    {
        name = 'Item Name',
        item = 'item_spawn_name',
        level = 0,
        description = 'Item description',
        xpReward = 10,
        requirements = {
            { item = 'steel', amount = 2, label = 'Steel' }
        }
    }
}

XP settings (example):

F4.XPPerLevel = 600
F4.XPPerHexagon = 100

Player Metadata Setup

Add the following lines to your qbx_core/server/player.lua file (around where other metadata fields are initialized):

playerData.metadata.crafting_level = playerData.metadata.crafting_level or 0
playerData.metadata.crafting_xp = playerData.metadata.crafting_xp or 0

This ensures every player starts with crafting progression data (level and XP) initialized properly.

Database

Execute the following SQL to create the crafting benches table:

CREATE TABLE IF NOT EXISTS `f4_crafting` (
    `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier for each crafting bench',
    `x` FLOAT NOT NULL COMMENT 'X coordinate of the crafting bench',
    `y` FLOAT NOT NULL COMMENT 'Y coordinate of the crafting bench',
    `z` FLOAT NOT NULL COMMENT 'Z coordinate of the crafting bench',
    `heading` FLOAT NOT NULL COMMENT 'Heading of the crafting bench',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Commands

  • /addcraftingtable — Add crafting bench (admin)

Demo / Video

Watch the demo video: https://youtu.be/aEZfh85U2n4

Discord : https://discord.gg/CXYX39zkma

License

MIT License — include the full MIT license text in the LICENSE file.

Updates

Latest Updates (October 2025)

  1. Blueprint System Added

    • Introduced a professional blueprint system for crafting
    • Add the following item to your ox_inventory\data\items.lua:
    ['blueprint'] = {
        label = 'Blueprint',
        weight = 50,
        stack = false,
        close = true,
        consume = 0,
        description = 'A professional crafting blueprint with detailed specifications and requirements',
        client = {
            image = 'blueprint.png'
        }
    },
  2. Dynamic Crafting Time System

    • Crafting time now scales based on the number of items being crafted
    • More items = longer crafting time for realistic progression
  3. Blueprint Distribution

    • Use the following command to give players blueprints:
    exports.ox_inventory:AddItem(src, 'blueprint', 1, { type = 'tools' })
  4. Live Demo

About

Professional crafting system for FiveM / Qbox with UI and level progression

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published