๐ปCustomizable Client code
cl_customize.lua
local QBCore = exports[Config.Core]:GetCoreObject()
-- Notify
RegisterNetEvent("Infiniti_Multijob:notify", function(title, desc, notiftype)
if Config.Notify == "ox" then
lib.notify({
title = title,
description = desc,
type = notiftype
})
elseif Config.Notify == "qb" then
QBCore.Functions.Notify(title, notiftype, 5000)
elseif Config.Notify == "okok" then
exports['okokNotify']:Alert(title, desc, 5000, 'notiftype', true) -- can set true to false to stop playing notif sound
elseif Config.Notify == "custom" then
-- Add in Custom Notify here
-- title = The title of the notification
-- desc = The description of the notification
-- notiftype = The type of the notification (success/error)
end
end)
-- Keybind
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(1, Config.OpenKey) then
if Config.Debug then
print("Triggered Open Menu")
end
TriggerEvent("Infiniti_Multijob:openhtmlmenu")
end
end
end)
Last updated