FX-CRAFT
Advanced crafting system for RedM with XP, level system, prop crafting, and full framework compatibility.
4 min readupdated 3 Jun 2026
On this page 21
#๐ฆ INSTALLATION
bashensure fx-craft
- Place the script inside
resources/fx-craft - Add
ensure fx-craftto yourserver.cfg - Restart your server
#โ๏ธ DEPENDENCIES
luadependencies {
'oxmysql'
}
- Required for database operations
- Script will not work without it
- You can use tools like HeidiSQL or phpMyAdmin to manage your database
- Make sure oxmysql is started before fx-craft
#๐๏ธ SQL INSTALLATION
#๐ Craft Tables
sqlCREATE TABLE IF NOT EXISTS `fx_craft_book` (
`bookId` VARCHAR(50) PRIMARY KEY,
`bookName` VARCHAR(100),
`allowedJobs` TEXT NOT NULL,
`createdAt` VARCHAR(20) DEFAULT NULL,
`craftData` LONGTEXT NOT NULL DEFAULT '[]'
);
CREATE TABLE IF NOT EXISTS `fx_craft_player` (
`charid` VARCHAR(50) NOT NULL,
`job` VARCHAR(50) NOT NULL,
`totalProduction` INT DEFAULT 0,
`currentXP` INT DEFAULT 1,
`currentLevel` INT DEFAULT 1,
PRIMARY KEY (`charid`, `job`)
);
- Stores player crafting progress and XP
- Handles crafting queue and production data
- Required for level system
#๐ฆ VORP ITEM INSTALL
sqlREPLACE INTO `items` (`item`, `label`, `limit`, `can_remove`, `type`, `usable`, `metadata`, `desc`)
VALUES
('craftbook', 'Craft Book', 5, 1, 'item_standard', 1, '{}', 'a craft book with recipes for making crafts'),
('p_benchwork01x', 'Craft Table', 5, 1, 'item_standard', 1, '{}', 'A workbench for Making Craft'),
('ironhammer', 'Hammer', 5, 1, 'item_standard', 1, '{}', 'A tool often used for crafting');
- Required items for crafting system
- craftbook โ opens crafting UI
- p_benchwork01x โ spawns crafting table
- ironhammer โ required tool item
#๐ฆ RSG ITEM INSTALL
luacraftbook = {
name = 'craftbook',
label = 'Craft Book',
weight = 100,
type = 'item',
image = 'craftbook.png',
unique = true,
useable = true,
shouldClose = true,
}
- Required if using RSG inventory
useable = trueis mandatory
#โ๏ธ CONFIG SYSTEM
#๐ง Basic Config
luaConfig.Language = "en"
Config.OrderListLimit = 10
Config.CraftSecurity = true
Config.HideLockedItems = true
- Language โ system language
- OrderListLimit โ max active crafting queue
- CraftSecurity โ prevents NUI exploit manipulation
- HideLockedItems โ hides items that player cannot craft
#๐ LEVEL SYSTEM
luaConfig.Levels = {
[1] = 1000,
[2] = 2000,
}
- Defines XP required per level
- Higher levels unlock more recipes
#๐งฑ PROP SYSTEM
luaConfig.SpawnPropItems = {
["p_benchwork01x"] = {
propModel = "p_benchwork01x",
durabilityDay = 3,
requiredItems = {
["ironhammer"] = {count = 1, remove = false},
["wood"] = {count = 5, remove = true},
},
craftData = Craft.CraftItems
},
}
- Allows players to spawn crafting tables
- requiredItems โ materials needed to place table
- durabilityDay โ lifetime of the prop
- craftData โ defines available recipes
#๐ OPEN CRAFT BOOK
luaTriggerServerEvent("fx-craft:server:OpenBook", Jobs, CraftData, bookImage, bookName, bookId)
- Opens crafting UI
- Jobs = false โ accessible to all players
- CraftData โ recipe categories
- bookId โ must be unique
#๐ WORLD CRAFT BOOK
luaConfig.CraftBooks = {
["valgunsmith"] = {
bookID = "FX-1001",
Settings = {
coords = {
vector4(-277.22, 779.18, 119.50, 267.68)
},
},
Categories = Craft.GunItems,
},
}
- Creates crafting interaction points in the world
- Players interact via prompt
- Categories โ determines available recipes
- coords โ location of interaction
#๐ง RECIPE SYSTEM
luaRecipes["weapon_melee_knife"] = {
itemName = "weapon_melee_knife",
rewardXP = 50,
duration = 30,
requiredLevel = 1,
requiredItems = RequiredItems["melee"]
}
- Defines craftable items
- rewardXP โ XP gained
- duration โ crafting time
- requiredItems โ required materials
#๐ชต REQUIRED ITEMS
luaRequiredItems["melee"] = {
{itemName = "ironbar", itemCount = 1},
}
- Defines crafting materials
- itemCount โ required quantity
- dontremove โ optional (prevents item removal)
#๐ญ ANIMATION SYSTEM
luaCraftAnims["table"]
- Controls player animation during crafting
- Improves immersion
#๐๏ธ CATEGORY SYSTEM
luaCraft.CraftItems = {
["materials"] = {
label = "Materials",
items = { ... }
}
}
- Defines UI categories (tabs)
- items โ list of recipes
#๐ NOTIFY SYSTEM
luaNotify({
text = "Craft Started",
type = "success"
})
- Sends notifications based on framework
- Supports VORP / RSG / REDEMRP
- type โ success / error / info
#โ๏ธ SERVER CONFIG
luaSV_Config.Webhook = {
url = "",
logo = "",
banner = "",
}
- Used for logging and webhook integrations
- Optional but recommended
#โ ๏ธ IMPORTANT NOTES
- bookId must always be unique
- requiredItems must match recipe keys
- CraftSecurity should stay enabled
- Categories must exist
- oxmysql must be running
#๐จ COMMON MISTAKES
- Duplicate bookId
- Missing RequiredItems
- Wrong category reference
- Invalid CraftData
- Missing SQL tables
#๐ SUMMARY
FX-Craft provides:
- Advanced crafting system
- XP & level progression
- World + prop crafting
- Framework compatibility
- Secure crafting validation
ยฉ Fixitfy Development