Professional crafting system for FiveM / Qbox with UI and level progression.
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.
- 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
- Persistent crafting queue saved in database
- Table-bound crafting and claiming (same table required)
- Ready-items panel with manual claim button (no auto-give)
Main crafting UI - item selection, crafting preview and material requirements.
Alternate view highlighting materials and controls.
Example in-game crafting table / workbench.
- Qbox Framework
- ox_lib
- oxmysql
- interact
- object_gizmo - https://github.com/DemiAutomatic/object_gizmo
- Execute
f4_Crafting.sqlin your database. - Add to
server.cfg:
ensure F4-CraftingF4.img = "ox_inventory" -- "ox_inventory" or "qb-inventory"F4.CraftingItems = {
{
name = 'Item Name',
item = 'item_spawn_name',
level = 0,
description = 'Item description',
xpReward = 10,
requirements = {
{ item = 'steel', amount = 2, label = 'Steel' }
}
}
}F4.XPPerLevel = 600
F4.XPPerHexagon = 100Add 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 0This ensures every player starts with crafting progression data (level and XP) initialized properly.
Execute the following SQL to create/update 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',
`craft_queue` LONGTEXT NULL COMMENT 'Pending crafted items queue in JSON format',
`queue_updated_at` DATETIME NULL DEFAULT NULL COMMENT 'Last queue update timestamp',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `f4_crafting`
ADD COLUMN IF NOT EXISTS `craft_queue` LONGTEXT NULL COMMENT 'Pending crafted items queue in JSON format',
ADD COLUMN IF NOT EXISTS `queue_updated_at` DATETIME NULL DEFAULT NULL COMMENT 'Last queue update timestamp';/addcraftingtable- Add crafting bench (admin)/removecraftingtable- Remove nearest crafting bench (admin)/removecraftingtable [id]- Remove crafting bench by table id (admin)
Watch the demo video: https://youtu.be/aEZfh85U2n4 Latest queue/table update demo: https://streamable.com/1qcyqe
Discord: https://discord.gg/CXYX39zkma
MIT License - include the full MIT license text in the LICENSE file.
-
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' } },
-
Dynamic Crafting Time System
- Crafting time now scales based on the number of items being crafted.
- More items means longer crafting time for realistic progression.
-
Blueprint Distribution
- Use the following command to give players blueprints:
exports.ox_inventory:AddItem(src, 'blueprint', 1, { type = 'tools' })
-
Live Demo
- View the previous update demonstration: https://streamable.com/031rwo
-
Persistent Queue System
- Crafted items are no longer auto-added when timer ends.
- Crafted outputs are stored in
f4_crafting.craft_queue. - Items remain after reconnect or server restart.
-
Table-Bound Claim System
- Crafting jobs are tied to the same table where they started.
- Players must claim from that table only.
- Queue ownership is tied to player identity.
-
Ready Items UI Panel
- Added right-side queue panel with vertical rows.
- Each row has its own
Takebutton for manual claim. - Supports multiple different crafted item types.
-
Admin Table Removal
- Added
/removecraftingtableand/removecraftingtable [id]. - Removal sync is broadcast to all players.
- Includes extra local cleanup path for stuck objects.
- Added
-
Live Demo
- Update video: https://streamable.com/1qcyqe