Accessible code
Utils = {}
Utils.Notification = function(title, description, type, duration)
lib.notify({
title = title,
description = description,
type = type,
duration = duration or 5000
})
end
Utils.ProgressBar = function(label, duration, anim)
if anim.dict == '' then anim.dict = nil end
if anim.anim == '' then anim.anim = nil end
if anim.scenario == '' then anim.scenario = nil end
if Config.progressType == 'oxdefault' then
if lib.progressBar({
duration = duration,
label = label,
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true,
mouse = true,
},
anim = {
dict = anim.dict,
clip = anim.anim,
scenario = anim.scenario
},
}) then return true else return false end
elseif Config.progressType == 'oxcircle' then
if lib.progressCircle({
duration = duration,
label = label,
position = Config.progressAlign,
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
combat = true,
mouse = true,
},
anim = {
dict = anim.dict,
clip = anim.anim,
scenario = anim.scenario
},
}) then return true else return false end
end
endUtils = {}
Utils.Notification = function(src, title, description, type, duration)
TriggerClientEvent('ox_lib:notify', src, {
title = title,
description = description,
type = type,
duration = duration
})
endLast updated