1
0
Fork 0
forked from Simnation/Main
Main/resources/[housing]/brutal_keys/cl_utils.lua
2025-07-09 21:31:55 +02:00

85 lines
No EOL
2.6 KiB
Lua

ESX = Core
QBCore = Core
-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(title, text, time, type)
if Config.BrutalNotify then
exports['brutal_notify']:SendAlert(title, text, time, type)
else
-- Put here your own notify and set the Config.BrutalNotify to false
SetNotificationTextEntry("STRING")
AddTextComponentString(text)
DrawNotification(0,1)
-- Default ESX Notify:
--TriggerEvent('esx:showNotification', text)
-- Default QB Notify:
--TriggerEvent('QBCore:Notify', text, 'info', 5000)
-- OKOK Notify:
-- exports['okokNotify']:Alert(title, text, time, type, false)
end
end
function TextUIFunction(type, text)
if type == 'open' then
if Config.TextUI:lower() == 'ox_lib' then
lib.showTextUI(text)
elseif Config.TextUI:lower() == 'okoktextui' then
exports['okokTextUI']:Open(text, 'darkblue', 'right')
elseif Config.TextUI:lower() == 'esxtextui' then
ESX.TextUI(text)
elseif Config.TextUI:lower() == 'qbdrawtext' then
exports['qb-core']:DrawText(text,'left')
elseif Config.TextUI:lower() == 'brutal_textui' then
exports['brutal_textui']:Open(text, "blue")
end
elseif type == 'hide' then
if Config.TextUI:lower() == 'ox_lib' then
lib.hideTextUI()
elseif Config.TextUI:lower() == 'okoktextui' then
exports['okokTextUI']:Close()
elseif Config.TextUI:lower() == 'esxtextui' then
ESX.HideUI()
elseif Config.TextUI:lower() == 'qbdrawtext' then
exports['qb-core']:HideText()
elseif Config.TextUI:lower() == 'brutal_textui' then
exports['brutal_textui']:Close()
end
end
end
function PoliceAlert(coords, plate)
local x,y,z = table.unpack(coords)
local streetLabel = GetStreetNameFromHashKey(GetStreetNameAtCoord(x,y,z))
if GetResourceState("brutal_policejob") == "started" then
TriggerServerEvent('brutal_policejob:server:citizencall', 'create', "Vehicle jacking", coords, streetLabel)
end
end
function OpenMenuUtil()
InMenu = true
SetNuiFocus(true, true)
Citizen.CreateThread(function()
while InMenu do
N_0xf4f2c0d4ee209e20() -- it's disable the AFK camera zoom
Citizen.Wait(15000)
end
end)
DisplayRadar(false)
end
function DisableMinimap()
DisplayRadar(false)
-- Here you can add a trigger to hide your HUD system
end
function EnableMinimap()
DisplayRadar(true)
-- Here you can add a trigger to enable your HUD system
end