Crafting
Configuration schema for crafting benches, job permissions, recipe costs, and zones.
Crafting Bench Definition
Configure crafting benches and recipes in shared/crafting.lua:
{
name = 'Demo Crafting',
blip = {enable = true, id = 643, color = 35, scale = 0.6},
-- Job restrictions
jobs = {
police = 0,
sheriff = 0
},
-- Gang restrictions
gangs = {
balles = 1,
lostmc = 0,
},
recipes = {
{
item = 'weapon_pistol', -- Reward item name
amount = 1, -- Reward quantity
required = {
weapon_pistol = {amount = 1, remove = true}, -- Consumed on craft
cleaner = {amount = 1}, -- Required but kept
toolkit = {amount = 0.2}, -- Degrades quality by 20%
},
duration = 5, -- Crafting duration in seconds
},
},
zones = {
{
coords = vector4(607.55, -3092.41, 6.02, 360.0),
size = vector3(2.5, 1.0, 1.5),
},
},
target = {label = 'Weapon Repair', icon = 'fa-pen-ruler', distance = 2.5},
peds = {
'mp_m_waremech_01',
}
},Schema Parameters
| Parameter | Type | Description |
|---|---|---|
name |
string | Unique crafting station identifier |
blip |
table | Map blip display settings |
jobs |
table | Allowed jobs and minimum required grades |
gangs |
table | Allowed gangs and minimum required grades |
recipes |
table | Array of craftable recipe item definitions |
zones |
table | World interaction coordinates and zone sizes |
target |
table | Target prompt label and interaction distance |
peds |
table | Ped models spawned at zone locations |
On this page