2025-06-18 02:30:02 +02:00
|
|
|
Config = {}
|
|
|
|
|
2025-06-18 05:47:41 +02:00
|
|
|
-- 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)
|
|
|
|
|
2025-06-18 02:30:02 +02:00
|
|
|
-- Change coffee props to grill props
|
|
|
|
Config.GrillProps = {
|
|
|
|
`prop_bbq_1`,
|
|
|
|
`prop_bbq_2`,
|
|
|
|
`prop_bbq_3`,
|
|
|
|
`prop_bbq_4`,
|
|
|
|
`prop_bbq_5`,
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Progressbar duration in ms
|
2025-06-18 05:47:41 +02:00
|
|
|
Config.ProgressTime = 5000
|
2025-06-18 02:30:02 +02:00
|
|
|
|
|
|
|
-- Change coffee options to grilling options
|
|
|
|
Config.GrillOptions = {
|
|
|
|
{
|
|
|
|
label = "Steak",
|
|
|
|
description = "Ein perfekt gegrilltes Steak",
|
2025-06-18 05:30:09 +02:00
|
|
|
item = "cooked_bbq_ribeye",
|
2025-06-18 02:30:02 +02:00
|
|
|
icon = "fa-solid fa-drumstick-bite",
|
|
|
|
requires = {
|
2025-06-18 05:51:12 +02:00
|
|
|
{item = "rawmeat", amount = 1},
|
2025-06-18 02:30:02 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
2025-06-18 05:47:41 +02:00
|
|
|
|