neue version

This commit is contained in:
Nordi98 2025-06-18 06:13:19 +02:00
parent 9fecb76a14
commit 616ce8e4f6
4 changed files with 158 additions and 230 deletions

View file

@ -1,24 +1,51 @@
Config = {}
-- Validate that the items exist in QBCore.Shared.Items
-- Grill-Props (Standard-GTA-Props)
Config.GrillProps = {
"prop_bbq_1",
"prop_bbq_2",
"prop_bbq_3",
"prop_bbq_4",
"prop_bbq_5"
}
-- Zeit zum Grillen (in ms)
Config.GrillTime = 5000
-- Grill-Rezepte
Config.GrillRecipes = {
{
label = "Steak",
description = "Ein perfekt gegrilltes Steak",
item = "cooked_bbq_ribeye",
icon = "fas fa-drumstick-bite",
requires = {
{item = "rawmeat", amount = 1}
}
}
-- Hier kannst du weitere Rezepte hinzufügen
}
-- Überprüfe, ob alle Items existieren
CreateThread(function()
Wait(2000) -- Wait for QBCore to be fully initialized
Wait(5000) -- Warte auf vollständige Initialisierung
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")
print("^1FEHLER: QBCore.Shared.Items nicht verfügbar^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)
-- Überprüfe Rezept-Items
for _, recipe in pairs(Config.GrillRecipes) do
if not QBCore.Shared.Items[recipe.item] then
table.insert(missingItems, recipe.item)
end
for _, req in ipairs(option.requires) do
-- Überprüfe Zutaten
for _, req in pairs(recipe.requires) do
if not QBCore.Shared.Items[req.item] then
table.insert(missingItems, req.item)
end
@ -26,37 +53,13 @@ CreateThread(function()
end
if #missingItems > 0 then
print("^1WARNING: The following items are missing from QBCore.Shared.Items:^7")
print("^1WARNUNG: Folgende Items fehlen in 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")
print("^2Alle Grill-Items existieren in QBCore.Shared.Items^7")
end
end)
-- 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
Config.ProgressTime = 5000
-- Change coffee options to grilling options
Config.GrillOptions = {
{
label = "Steak",
description = "Ein perfekt gegrilltes Steak",
item = "cooked_bbq_ribeye",
icon = "fa-solid fa-drumstick-bite",
requires = {
{item = "rawmeat", amount = 1},
}
},
}