forked from Simnation/Main
ed
This commit is contained in:
parent
1c16382e41
commit
8fafbc43d0
9 changed files with 5 additions and 267 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue