1
0
Fork 0
forked from Simnation/Main
Main/resources/[inventory]/nordi_bbq/config.lua

66 lines
1.6 KiB
Lua
Raw Normal View History

2025-06-18 02:30:02 +02:00
Config = {}
2025-06-18 06:13:19 +02:00
-- 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
2025-06-18 05:47:41 +02:00
CreateThread(function()
2025-06-18 06:13:19 +02:00
Wait(5000) -- Warte auf vollständige Initialisierung
2025-06-18 05:47:41 +02:00
local QBCore = exports['qb-core']:GetCoreObject()
if not QBCore or not QBCore.Shared or not QBCore.Shared.Items then
2025-06-18 06:13:19 +02:00
print("^1FEHLER: QBCore.Shared.Items nicht verfügbar^7")
2025-06-18 05:47:41 +02:00
return
end
local missingItems = {}
2025-06-18 06:13:19 +02:00
-- Überprüfe Rezept-Items
for _, recipe in pairs(Config.GrillRecipes) do
if not QBCore.Shared.Items[recipe.item] then
table.insert(missingItems, recipe.item)
2025-06-18 05:47:41 +02:00
end
2025-06-18 06:13:19 +02:00
-- Überprüfe Zutaten
for _, req in pairs(recipe.requires) do
2025-06-18 05:47:41 +02:00
if not QBCore.Shared.Items[req.item] then
table.insert(missingItems, req.item)
end
end
end
if #missingItems > 0 then
2025-06-18 06:13:19 +02:00
print("^1WARNUNG: Folgende Items fehlen in QBCore.Shared.Items:^7")
2025-06-18 05:47:41 +02:00
for _, item in ipairs(missingItems) do
print("^1- " .. item .. "^7")
end
else
2025-06-18 06:13:19 +02:00
print("^2Alle Grill-Items existieren in QBCore.Shared.Items^7")
2025-06-18 05:47:41 +02:00
end
end)