Installation
Requirements
Before installing nd_crafting, ensure you have:
- A working FiveM server
- One of: QBCore, QBox, or ESX framework
- ox_lib
- oxmysql
- A supported inventory system
Installation Steps
Step 1: Download the Resource
Download the latest release from GitHub or clone the repository:
git clone https://github.com/NateDoggDev/nd_crafting.git
Step 2: Place in Resources Folder
Move the nd_crafting folder to your server's resources directory:
resources/
└── [standalone]/
└── nd_crafting/
Step 3: Run the SQL
Import the database schema. The SQL file is located at nd_crafting/sql/install.sql:
-- Crafting Queue Table
CREATE TABLE IF NOT EXISTS `nd_crafting_queue` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`player_id` VARCHAR(60) NOT NULL,
`station_id` VARCHAR(60) NOT NULL,
`recipe_id` VARCHAR(60) NOT NULL,
`start_time` BIGINT NOT NULL,
`end_time` BIGINT NOT NULL,
`status` ENUM('pending', 'crafting', 'completed', 'failed', 'cancelled') DEFAULT 'pending',
`craft_data` JSON DEFAULT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
INDEX idx_player (player_id),
INDEX idx_station (station_id),
INDEX idx_status (status)
);
-- Crafting Stations Table
CREATE TABLE IF NOT EXISTS `nd_crafting_stations` (
`id` VARCHAR(60) PRIMARY KEY,
`type` VARCHAR(60) NOT NULL,
`label` VARCHAR(100) NOT NULL,
`coords` JSON NOT NULL,
`model` VARCHAR(60) DEFAULT NULL,
`recipes` JSON DEFAULT NULL,
`blip` JSON DEFAULT NULL,
`placed_by` VARCHAR(60) DEFAULT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Step 4: Add to server.cfg
Add the resource to your server.cfg:
ensure ox_lib
ensure oxmysql
ensure nd_crafting
Make sure ox_lib and oxmysql start before nd_crafting.
Step 5: Restart Your Server
Restart your server or run:
ensure nd_crafting
Verify Installation
After starting the resource, you should see in your server console:
[nd_crafting] Resource started successfully
The resource will automatically detect your framework and inventory system. Check the console for detection messages.
First Steps
- Join your server as an admin
- Run
/craftadminto open the admin menu - Place your first crafting station
- Interact with the station to start crafting!
Troubleshooting
"ox_lib is not installed"
Make sure ox_lib is in your resources and started before nd_crafting.
"oxmysql is not installed"
Make sure oxmysql is in your resources and connected to your database.
Database tables not created
Run the SQL file manually in your database, or check your oxmysql connection.
Stations not appearing
Check your config/stations.lua file for syntax errors.