Crafting
Crafting benches can be placeable by players or at static locations defined in the config
The crafting bench coords (if using the static method) must be
vector4
You can define multiple categories and craftable items in the
Crafting
table
Config.Crafting = {-- define items that can be crafted at the crafting benches
Benches = {
model = 'prop_tool_bench02', -- prop name for crafting bench
openicon = 'fa-solid fa-bars', -- target icon
openlabel = 'Use Crafting Bench', -- target label
closeicon = 'fas fa-xmark', -- target icon
closelabel = 'Remove Crafting Bench', -- target label
distance = 4.0, -- target distance
spawning = {
method = 'static', -- choose between static or placeable crafting benches
--use 'static' for static crafting bench locations (make sure to define coords below)
--use 'placeable' for placeable crafting benches (make sure the item is in your items.lua)
--if set to static you must define coords for spawn locations below
--if set to placeable you can ignore the coords table below
coords = { -- define coords for crafting bench locations if set to 'static' must be vector4
vector4(2942.67, 2746.51, 43.28, 14.17), -- davis quarry
vector4(-595.92, 2093.5, 131.48, 0.0), -- chaparral mineshaft
},
blip = { -- define blip settings
enabled = true, -- enable blip
id = 103, -- blip id
colour = 5, -- blip colour
scale = 0.7, -- blip scale
title = 'Crafting Bench', -- blip title
},
},
},
Crafting = {
['Misc'] = { -- crafting category name
['coalsack'] = { -- the key is the craftable item name
recipe = { -- recipe required to craft item
--name is item name
--amount is required amount
--remove is boolean if that item should be removed (things like tools etc set to false)
{name = 'coal', amount = 10, removed = true, },
{name = 'hessiensack', amount = 1, removed = true, },
},
returned = { -- define return amount
amount = 1, -- amount of crafted item given
},
progress = { -- define progressCircle settings
duration = 5000, --progressCircle duration to craft the item (multiplied by the amount player chooses)
label = 'Sacking coal', -- progressCircle label
anim = { -- define animation settings
anim = 'anim@amb@board_room@supervising@', -- animation name
dict = 'think_01_hi_amy_skater_01', -- animation dict name
flag = 49, -- flag number
},
prop = { -- define prop settings
model = nil, -- prop model
bone = nil, -- bone index
pos = nil, -- prop position
rot = nil, -- prop rotation
},
},
},
--add more crafting options as required here
},
['Jewelery'] = { -- crafting category name
['goldchain'] = { -- the key is the craftable item name
recipe = { -- recipe required to craft item
--name is item name
--amount is required amount
--remove is boolean if that item should be removed (things like tools etc set to false)
{name = 'goldingot', amount = 10, removed = true, },
{name = 'screwdriverset', amount = 1, removed = false, },
},
returned = { -- define return amount
amount = 1, -- amount of crafted item given
},
progress = { -- define progressCircle settings
duration = 10000, --progressCircle duration to craft the item (multiplied by the amount player chooses)
label = 'Crafting jewelery', -- progressCircle label
anim = { -- define animation settings
anim = 'anim@amb@board_room@supervising@', -- animation name
dict = 'think_01_hi_amy_skater_01', -- animation dict name
flag = 49, -- flag number
},
prop = { -- define prop settings
model = nil, -- prop model
bone = nil, -- bone index
pos = nil, -- prop position
rot = nil, -- prop rotation
},
},
},
--add more items are required
},
--add more categories as required
},
}
Last updated