This commit is contained in:
Nordi98 2025-06-18 05:47:41 +02:00
parent 271588ccb0
commit 0a7362cf0b
2 changed files with 74 additions and 16 deletions

View file

@ -1,5 +1,40 @@
Config = {}
-- Validate that the items exist in QBCore.Shared.Items
CreateThread(function()
Wait(2000) -- Wait for QBCore to be fully initialized
local QBCore = exports['qb-core']:GetCoreObject()
if not QBCore or not QBCore.Shared or not QBCore.Shared.Items then
print("^1ERROR: QBCore.Shared.Items is not available^7")
return
end
-- Check if all required items exist
local missingItems = {}
for _, option in ipairs(Config.GrillOptions) do
if not QBCore.Shared.Items[option.item] then
table.insert(missingItems, option.item)
end
for _, req in ipairs(option.requires) do
if not QBCore.Shared.Items[req.item] then
table.insert(missingItems, req.item)
end
end
end
if #missingItems > 0 then
print("^1WARNING: The following items are missing from QBCore.Shared.Items:^7")
for _, item in ipairs(missingItems) do
print("^1- " .. item .. "^7")
end
else
print("^2All grill items exist in QBCore.Shared.Items^7")
end
end)
-- Change coffee props to grill props
Config.GrillProps = {
`prop_bbq_1`,
@ -12,12 +47,10 @@ Config.GrillProps = {
`bzzz_grill_a`,
`smallbbqtrailer`,
`bigbbqtrailer`,
-- Add any other grill props you want to use
}
-- Progressbar duration in ms
Config.ProgressTime = 5000 -- Maybe increase time for grilling
Config.ProgressTime = 5000
-- Change coffee options to grilling options
Config.GrillOptions = {
@ -40,3 +73,4 @@ Config.GrillOptions = {
}
},
}