FX-CRAFT

Advanced crafting system for RedM with XP, level system, prop crafting, and full framework compatibility.

4 min readupdated 3 Jun 2026

FX-Craft€50.00View in store
On this page 21
  1. INSTALLATION
  2. DEPENDENCIES
  3. SQL INSTALLATION
  4. Craft Tables
  5. VORP ITEM INSTALL
  6. RSG ITEM INSTALL
  7. CONFIG SYSTEM
  8. Basic Config
  9. LEVEL SYSTEM
  10. PROP SYSTEM
  11. OPEN CRAFT BOOK
  12. WORLD CRAFT BOOK
  13. RECIPE SYSTEM
  14. REQUIRED ITEMS
  15. ANIMATION SYSTEM
  16. CATEGORY SYSTEM
  17. NOTIFY SYSTEM
  18. SERVER CONFIG
  19. IMPORTANT NOTES
  20. COMMON MISTAKES
  21. SUMMARY

#📦 INSTALLATION

bashensure fx-craft
  • Place the script inside resources/fx-craft
  • Add ensure fx-craft to your server.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 = true is 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