1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-08-13 23:34:58 +02:00
parent 1c16382e41
commit 8fafbc43d0
9 changed files with 5 additions and 267 deletions

View file

@ -261,3 +261,4 @@ AddEventHandler("chema_shisha:deleteAll", function()
DeleteObject(mobilehooka)
end
end)

View file

@ -22,13 +22,15 @@ QBCore.Commands.Add("deleteshisha", "Lösche deine Shisha und bekomme sie zurüc
TriggerClientEvent('QBCore:Notify', source, 'Shisha entfernt und ins Inventar zurückgelegt', 'success')
end)
QBCore.Commands.Add("deleteallshishas", "Delete all placed shishas on the server (Admin Only)", {}, true, function(source)
QBCore.Commands.Add("deleteallshishas", "Delete all placed shishas on the server (Admin Only)", {}, false, function(source)
local Player = QBCore.Functions.GetPlayer(source)
if Player.PlayerData.permission == "admin" or Player.PlayerData.permission == "god" then
-- Check if player has the admin job
if Player.PlayerData.job.name == "admin" then
TriggerClientEvent("chema_shisha:deleteAll", -1)
TriggerClientEvent('QBCore:Notify', source, 'All shishas have been deleted', 'success')
else
TriggerClientEvent('QBCore:Notify', source, 'You do not have permission to use this command', 'error')
end
end)