local QBCore = exports['qb-core']:GetCoreObject() -- Liste der Prop-Modelle für sofortige Schredder local shredderPropModels = { 'p_secret_weapon_02', 'prop_bin_08a' } -- Liste der Prop-Modelle für zeitverzögerte Mülltonnen local trashBinPropModels = { 'prop_bin_01a', 'prop_bin_03a', 'prop_bin_04a', 'prop_bin_07a', 'prop_dumpster_01a', 'prop_dumpster_02a', 'prop_dumpster_02b', 'prop_dumpster_3a' } -- Variable zum Speichern der aktuellen Entität local currentEntity = nil local currentType = nil -- QB-Target zu allen passenden Props in der Welt hinzufügen Citizen.CreateThread(function() -- Für sofortige Schredder for _, model in ipairs(shredderPropModels) do exports['qb-target']:AddTargetModel(model, { options = { { num = 1, type = "client", event = "disposal:openInventory", icon = "fas fa-dumpster", label = "Müllschredder öffnen", action = function(entity) currentEntity = entity currentType = "shredder" TriggerEvent('disposal:openInventory') end, }, { num = 2, type = "client", event = "disposal:openMenu", icon = "fas fa-fire", label = "Items vernichten", action = function(entity) currentEntity = entity currentType = "shredder" TriggerEvent('disposal:openMenu') end, } }, distance = 2.0 }) end -- Für zeitverzögerte Mülltonnen - nur eine Option zum Öffnen for _, model in ipairs(trashBinPropModels) do exports['qb-target']:AddTargetModel(model, { options = { { num = 1, type = "client", event = "disposal:openInventory", icon = "fas fa-trash", label = "Mülltonne öffnen", action = function(entity) currentEntity = entity currentType = "trash" TriggerEvent('disposal:openInventory') end, } }, distance = 2.0 }) end print("^2[DISPOSAL]^7 QB-Target zu " .. #shredderPropModels .. " Schredder-Modellen und " .. #trashBinPropModels .. " Mülltonnen-Modellen hinzugefügt") end)