There are many ox settings available in the files, if you want, you can configure them.
Config OX Settings
If you want to use ox_lib, please check if this link is enabled on fxmanifest.check it out from inside lua. this must be turned on before you can use ox_lib. After opening it, it will be enough to use the refresh and ensure commands.
```lua
local ESX = exports["es_extended"]:getSharedObject()
function CustomNotifVariation(text, ttype, time)
if Config.OxLib then
lib.notify({
title = 'Clean System',
description = text,
type = ttype
})
else
ESX.ShowNotification(text, ttype, time)
end
end
function ShowTextUI(text)
if Config.OxLib then
lib.showTextUI(text, {position = 'left-center'})
else
-- You can edit here if you want use another system
end
end
function HideTextUI()
if Config.OxLib then
lib.hideTextUI()
else
-- You can edit here if you want use another system
end
end
function CustomOxProgressbar(text, time, action)
local data = {
duration = time,
label = text,
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
sprint = true,
combat = true,
},
}
if action == "clean" then
local settings = Config.BroomAnimationOptions
data.anim = {
dict = settings.dict,
clip = settings.anim,
flag = settings.flag
}
if not Config.UseCleanTrolley then
data.prop = {
model = Config.BroomModel,
pos = vec3(settings.pos[1], settings.pos[2], settings.pos[3]),
rot = vec3(settings.rot[1], settings.rot[2], settings.rot[3]),
bone = settings.bone
}
end
elseif action == "recycleproducts" then
local settings = Config.RecycleAnimationSettings
data.anim = {
dict = settings.wait.dict,
clip = settings.wait.anim,
flag = settings.wait.flag,
}
end
if lib.progressBar(data) then return true else return false end
end
function Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
if GetResourceState('progressbar') == 'started' then
exports['progressbar']:Progress({
name = name:lower(),
duration = duration,
label = label,
useWhileDead = useWhileDead,
canCancel = canCancel,
controlDisables = disableControls,
animation = animation,
prop = prop,
propTwo = propTwo,
}, function(cancelled)
if not cancelled then
if onFinish then
onFinish()
end
else
if onCancel then
onCancel()
end
end
end)
else
print("Progressbar script not started! (https://github.com/qbcore-framework/progressbar)")
end
end
function DefaultProgressbar(text, time, action, cb)
local propdata = {}
local animdata = {}
if action == "clean" then
local settings = Config.BroomAnimationOptions
animdata = {
animDict = settings.dict,
anim = settings.anim,
flags = settings.flag,
}
if not Config.UseCleanTrolley then
propdata = {
model = Config.BroomModel,
pos = {settings.pos[1], settings.pos[2], settings.pos[3]},
rot = {settings.rot[1], settings.rot[2], settings.rot[3]},
bone = settings.bone
}
end
elseif action == "recycleproducts" then
local settings = Config.RecycleAnimationSettings
animdata = {
animDict = settings.wait.dict,
anim = settings.wait.anim,
flags = settings.wait.flag,
}
end
-- https://github.com/qbcore-framework/progressbar Default Use This
Progressbar('wertcleanplaceprog', text, time, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, animdata, propdata, {}, function()
cb(true)
end, function()
cb(false)
end)
end
RegisterNetEvent('wert-cleanplaces:client:custom-notif', function(text, ttype, time)
CustomNotifVariation(text, ttype, time)
end)
```
```lua
LANG = {
cleaning_process = "Cleaning ...",
drawtext_cleaning_text = "[E] Clean",
wertui = {
key = "E",
cleantext = "CLEAN",
},
trolley_target = {
remove = "Remove Clean Trolley",
takebroom = "Take Broom",
putbackbroom = "Put Back Broom",
startpushing = "Take Trolley",
puttrash = "Empty The Trash",
},
stop_pushing = "~r~[E]~w~ Break",
broom_error = 'You Dont Have Broom In Your Hands',
bag_error = 'You need put back broom for take this trash!',
ui = {
space = "SPACE",
space_desc = "Fix it to the ground",
zkey = "Z",
z_desc = "Reduce the height",
arrow = "ARROW KEYS",
arrow_desc = "Change it location",
qekey = "Q-E",
qekey_desc = "Rotate",
enter = "ENTER",
enter_desc = "Finish",
backspace = "BACKSPACE",
backspace_desc = "Cancel"
},
recycle_device_busy = "The Recycling Device Is Busy",
recycle_device_item_error = "You do not have an item suitable for recycler!",
recycling_process = "Recycling ...",
recycle_completed = "The recycling has been completed, at the end of this process, you have received %s recycling products!",
dont_found_item_for_sell = "There's nothing on it that you can sell!",
sell_finished = "You Sold %s Recycling Products And Earned %s $ In Return!",
trolley_no_target_interaction = "[E] Clean Trolley",
trolley_no_target_menu_header = "Clean Trolley Actions",
no_target_recycle_device_interaction = "[E] Recycling Device",
no_target_sell_product_int = "[E] Sell Products",
job_shop_interaction = "[E] Buy Equipments",
job_shop_menu_title = "Buy Cleaning Equipment",
job_shop_money_error = "Not enough money!",
}
```