okokCrafting is a crafting system for QBCore with its own crafting menu. You place crafting tables anywhere on the map and decide per table which items can be crafted, by whom and with which components.
How it works
- Crafting queue: players can start several crafts and wait near the table until the queue is done.
- Add as many items to a crafting table as you want, each with as many required components as you want.
- If a player leaves the crafting radius, the countdown stops until they come back.
- If a player dies, the components of all items in the queue go back to their inventory.
- The crafting menu cannot be opened inside a vehicle.
- Server-side checks against players who try to get items by calling events.
- Discord logs when a craft starts, finishes, when a player dies while crafting and when someone tries to call an event illegally.
XP system
- Can be turned on or off.
- Set the max level (20 by default), the XP for the first level and a level multiplier that makes levelling harder or easier.
- Choose whether players get XP when a craft fails.
- Players keep collecting XP after the max level, so raising the max level later updates their level.
Per crafting table and item
- Table: coordinates, interaction radius, max craft radius, blip and floor marker, marker distance, table name and a unique table ID.
- Item: item name, amount, success chance, item or weapon, crafting time, required level, XP per craft, components with amount and whether they are kept, and which jobs may craft it (empty = everyone).
- General: open key (E by default), hide the minimap while the menu is open, use okokTextUI or the default help notification.
Requirements
- QBCore
- oxmysql
- okokTextUI (optional)
Installation
- Copy
okokCrafting into your resources folder.
- Put your item images (PNG, named exactly like the items in your database) into
okokCrafting/web/icons.
- For the XP system run
ALTER TABLE players ADD COLUMN xp INT(255) NOT NULL default 0;
- Set your tables and recipes in
config.lua and your Discord webhook in server.lua.
- Add
ensure okokCrafting to your server config.