Accessible code
Config = {
locales = 'en',
versionChecking = true,
tableProp = 'gr_prop_gr_bench_04b',
tableitem = 'crafting_table',
textUIAlign = 'left-center',
menuUIAlign = 'top-right',
useTarget = true,
targetType = 'qb', -- ox, qb
spawnPropDistance = 25.0,
interactionDistance = 1.5,
targetDistance = 2.5,
spawnAnyWhere = false,
groundHashes = {
-1286696947,
1144315879,
1333033863,
-1942898710,
-1885547121,
223086562,
-461750719,
},
idString = 'table-xxxxx-xxxxx',
maxTablePerPlayer = 2,
toggleBlip = {
enable = true,
command = 'tableblip',
blipSettings = {
id = 478,
color = 2,
scale = 0.8,
display = 4,
}
},
commands = {
[1] = {
enable = true,
command = 'tptotable',
permission = 'user.admin',
help = 'Teleport to crafting table',
params = {
{
name = 'tableId',
type = 'string',
help = 'Enter table id'
}
}
},
[2] = {
enable = true,
command = 'tables',
permission = 'user.admin',
help = 'Edit crafting tables',
},
},
levels = {
[0] = {
label = 'Beginner',
},
[1] = {
label = 'Crafter',
xpRequire = 150,
},
[2] = {
label = 'Advanced Crafter',
xpRequire = 350,
},
[3] = {
label = 'Expert Crafter',
xpRequire = 500,
},
},
defaultRecipes = {
{
label = 'Radio',
item = 'radio',
amount = 1,
levelreq = 0,
xp = 20,
craftTime = 1, -- in seconds
imgpath = 'https://cfx-nui-qb-inventory/html/images/radio.png',
recipe = {
{item = "iron", label = "Iron", amount = 1},
}
},
},
blueprintsRecipes = {
lockpick = {
label = 'Lockpick',
item = 'lockpick',
amount = 1,
levelreq = 0,
xp = 50,
craftTime = 5, -- in seconds
imgpath = 'https://cfx-nui-qb-inventory/html/images/lockpick.png',
recipe = {
{item = "iron", label = "Iron", amount = 1},
}
}
},
}
function progressBar(duration, label, animDict, animClip)
if lib.progressBar({
duration = duration,
label = label,
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true,
},
anim = {
dict = animDict,
clip = animClip
},
}) then
return true
else
return false
end
end
Notification = function (title, description, type)
-- types are success and error
lib.notify({
title = title,
description = description,
type = type
})
end
-- BLUE PRINT ITEMS USABLE
CreateUsableItem('lockpick_blueprint', function(source, item)
local Player = GetPlayerBySource(source)
if not Player then return end
UseBluePrint(Player, 'lockpick', 'lockpick_blueprint')
end)
--exports['uniq-craftingtables']:UseBluePrint(player, blueprintName, itemName)
Notification = function (source, title, description, type)
-- types are success and error
TriggerClientEvent('ox_lib:notify', source, {
title = title,
description = description,
type = type
})
end
Last updated