Add a bench in the config#
Most servers place benches with /craftadmin. A config bench looks like this:
Config.Benches = {
{ id = 'pier_workbench', tier = 'basic', label = 'Workbench', coords = vec4(716.73, -962.36, 30.40, 270.0) },
{ id = 'ballas_weapons', tier = 'weapons', label = 'Weapons Bench', coords = vec4(1689.84, 3291.12, 41.15, 0.0),
access = { mode = 'whitelist', gangs = { ballas = 0 } } },
}
access.mode is 'global', 'whitelist' or 'blacklist', matched on jobs = { name = minGrade }, gangs = { name = minGrade } and cids = { CITIZENID = true }.
Add a recipe with a blueprint and a weekly cap#
{ id = 'my_suppressor_light', item = 'at_suppressor_light', count = 1, category = 'attachments', tier = 'attachments',
level = 8, time = 120, xp = 80, rarity = 'rare',
blueprint = true, source = 'Shipment crates', weekly = 10,
ingredients = { steel = 6, firearm_parts = 1 }, desc = 'Quiet enough for the neighbours.' },
The item must exist in your inventory, or the recipe is hidden and listed in the console at start.
Block benches near a police station#
Config.Placeable.blockedZones = {
{ coords = vec3(441.0, -982.0, 30.7), radius = 60.0 },
}
Give a blueprint from another script#
-- Hand over the item (ox_inventory or qb-inventory)
exports['glitch-crafting']:CreateBlueprint(source, 'thermite')
-- Or learn it straight away (works on ESX too)
exports['glitch-crafting']:LearnBlueprint(source, 'thermite')
Report a finished robbery#
TriggerEvent('glitch_criminaltablet:reportJobComplete', {
jobId = 'bank',
participants = { src1, src2 },
})
Each participant gets one roll of every reward table for bank. A job id that no table lists gives nothing.
Register a bench from another resource#
local function addBench()
exports['glitch-crafting']:SetExternalBench('gang_hq_bench', {
label = 'HQ Workbench', tier = 'weapons',
x = 100.0, y = -200.0, z = 30.0, h = 90.0,
access = { mode = 'whitelist', gangs = { vagos = 2 } },
})
end
AddEventHandler('glitch-crafting:dbReady', addBench)
External benches live in memory, so send them again on glitch-crafting:dbReady.
Delete a character#
exports['glitch-crafting']:WipeCharacter(citizenid)
This removes the queue, blueprints, craft log and KVP counters for that character. It does not check permissions, so call it only from trusted server code.
Stuck on a step?Ask in the Discord →