This commit is contained in:
Nordi98 2025-08-13 14:27:28 +02:00
parent 48844d7321
commit 769454360e
72 changed files with 734 additions and 0 deletions

View file

@ -0,0 +1,27 @@
if Config.ServerType == "QB" then
QBCore = exports['qb-core']:GetCoreObject()
elseif Config.ServerType == "ESX" then
ESX = exports['es_extended']:getSharedObject()
end
if Config.OpenUI.useCommand then
lib.addCommand(Config.OpenUI.Command_Name, {
help = 'Open Breathalyzer ',
}, function(source)
TriggerClientEvent('cs:drunk:openUI', source)
end)
end
if Config.OpenUI.useItem then
if Config.ServerType == 'ESX' then
ESX.RegisterUsableItem(Config.OpenUI.Item_Name, function(source)
TriggerClientEvent('cs:drunk:openUI', source)
end)
elseif Config.ServerType == 'QB' then
QBCore.Functions.CreateUseableItem(Config.OpenUI.Item_Name, function(source)
TriggerClientEvent('cs:drunk:openUI', source)
end)
else
--YOU CAN ADD YOUR CUSTOM EVENTS HERE
end
end