Wert Cleaning System And Jobs
You can access the setup information you need about this product
INSTALLATION
1 - Upload the script folder to the location of your resources
2 - Check config file for your own settings
3 -Please add the items to your list in the items section below
4 - Installation successful, have a good funs
ITEMS
-- Default Items
["cleancar"] = {
["name"] = "cleancar",
["label"] = "Cleaning Car",
["weight"] = 100,
["type"] = "item",
["image"] = "cleancar.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = ""
},
["trash_paper"] = {
["name"] = "trash_paper",
["label"] = "Trash Paper",
["weight"] = 100,
["type"] = "item",
["image"] = "trash_paper.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = ""
},
["trash_bag"] = {
["name"] = "trash_bag",
["label"] = "Trash Bag",
["weight"] = 100,
["type"] = "item",
["image"] = "trash_bag.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = ""
},
["trash_bottles"] = {
["name"] = "trash_bottles",
["label"] = "Trash Bottles",
["weight"] = 100,
["type"] = "item",
["image"] = "trash_bottles.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = ""
},
["recycler_product"] = {
["name"] = "recycler_product",
["label"] = "Recycler Product",
["weight"] = 100,
["type"] = "item",
["image"] = "recycler_product.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = ""
},
OX LIB OPTION
There are many ox settings available in the files, if you want, you can configure them.
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.
OPEN FILES
Config File
```lua
Config = {}
Config.UseTarget = true
Config.RefreshServerLoop = 10000
Config.Debug = false
Config.UseOnlyThisJobForClean = nil -- If you make example only this job "cleaner" who have cleaner job perm only him clean and access features
Config.OxLib = false
Config.OxLibProgressbar = false -- | If you disable it script auto use this https://github.com/qbcore-framework/progressbar
Config.UseCleanTrolley = true -- Clean trolley car enable or disable | true -> enable , false -> disable
Config.CleanTrolleyItem = "cleancar"
Config.CleanTrolleyModel = "prop_cleaning_trolly"
Config.CleanTrolleyNoTargetDistance = 1.5
Config.CleanTrolleyNoTargetKey = 38 -- [E] https://docs.fivem.net/docs/game-references/controls/
Config.EnableBlips = false -- true = enable | false = disable
Config.EnableJobShop = false -- true = enable | false = disable
Config.JobShops = {
{
model = "s_m_y_winclean_01",
coord = vector3(63.44, -1728.57, 28.64),
heading = 52.5,
icon = "fa-solid fa-toolbox",
label = "Buy Equipments",
distance = 1.5,
notargetdistance = 2.0,
blip = {
active = true,
sprite = 351,
color = 2,
scale = 1.0,
label = "Clean Job Shop"
}
},
}
Config.JobShopKey = 38
Config.JobShopItems = {
{item = "cleancar", label = "Clean Car", description = "Click for buy ->", image = 'nui://qb-inventory/html/images/cleancar.png', price = 100},
}
Config.JobShopPayType = "cash" -- "cash" or "bank"
Config.BroomModel = `prop_tool_broom`
Config.BroomOptions = {
bone = 28422,
x = -0.0100,
y = 0.0400,
z = -0.0300,
rot = {0.0, 0.0, 0.0}
}
Config.BroomAnimationOptions = {
dict = 'anim@amb@drug_field_workers@rake@male_a@idles',
anim = 'idle_b',
pos = {-0.0100, 0.0400, -0.0300},
rot = {0.0, 0.0, 0.0},
bone = 28422,
flag = 1,
time = 10000
}
Config.RemoveTrolleyIcon = "fa-solid fa-xmark"
Config.TakeBroomIcon = "fa-solid fa-broom"
Config.PutBackBroomIcon = "fa-regular fa-hand"
Config.TakeStandIcon = "fa-solid fa-hands-holding"
Config.PutTrashIcon = "fa-solid fa-dumpster"
Config.PushAnimation = {
lib = "missfinale_c2ig_11",
anim = "pushcar_offcliff_f",
}
Config.BreakTrollerZOffset = 0.3
Config.PushTrolleyAttachSetting = {
bone = 28422,
pos = {-0.45, -1.55, -0.82},
rot = {180.0, 180.0, 350.0}
}
Config.TrashTypes = {
["trash"] = {
"ng_proc_paper_02a",
"ng_proc_brkbottle_02e",
"ng_proc_litter_plasbot3",
"prop_cs_rub_binbag_01",
},
["bootle"] = {
"ng_proc_brkbottle_02e",
"ng_proc_litter_plasbot2",
"ng_proc_brkbottle_02a",
"prop_bottle_cognac",
"h4_prop_battle_whiskey_bottle_s",
},
}
-- Special types of garbage with prop that will be handled and unloaded into the car. You can add and edit more if you want.
Config.PutTrashes = {
[`prop_cs_rub_binbag_01`] = {
model = `prop_cs_rub_binbag_01`,
dict = 'missfbi4prepp1',
anim = '_bag_walk_garbage_man',
bone = 57005,
pos = {0.12, 0.0, -0.05},
rot = {220.0, 120.0, 0.0},
deliver = {
dict = 'missfbi4prepp1',
anim = '_bag_throw_garbage_man',
exitdict = 'missfbi4prepp1',
exitanim = 'exit'
}
},
}
Config.InteractionType = "wertui" -- | "wertui", "drawtext"
Config.WertUiZPlusOffset = 0.45
Config.DrawTextZPlusOffset = 0.3
-- Trash marker settings
Config.UseMarker = true
Config.MarkerMinumumSize = 1.5
Config.MarkerMaximumSize = 10.0
Config.MarkerSetting = {
type = 2,
zplusoffset = 0.6,
sizea = 0.15,
sizeb = 0.15,
sizec = 0.15,
r = 37,
g = 88,
b = 74,
a = 0.38
}
-- Trash circle settings
Config.UseCircle = false
Config.CircleMinumumSize = 1.5
Config.CircleMaximumSize = 10.0
Config.CircleSetting = {
zplusoffset = 0.4,
r = 37,
g = 88,
b = 74,
a = 0.38
}
-- Rewards
Config.EnableDynamicTrashItems = true -- | true -> enable, false -> disable |
Config.DefaultTrashItem = 'trash_bottles' -- If you set false Config.EnableDynamicTrashItems option script give always this item when you clean a trash
Config.DefaultTrashAmount = {
default = 1,
random = {
use = false,
min = 1,
max = 2,
}
}
Config.DynamicTrashItems = {
[`ng_proc_paper_02a`] = {item = "trash_paper", amount = 1, random = {use = false, min = 1, max = 3}},
[`ng_proc_brkbottle_02e`] = {item = "trash_bottles", amount = 1, random = {use = false, min = 1, max = 3}},
[`ng_proc_litter_plasbot3`] = {item = "trash_bottles", amount = 1, random = {use = false, min = 1, max = 3}},
[`prop_cs_rub_binbag_01`] = {item = "trash_bag", amount = 1, random = {use = false, min = 1, max = 3}},
[`ng_proc_litter_plasbot2`] = {item = "trash_bottles", amount = 1, random = {use = false, min = 1, max = 3}},
[`ng_proc_brkbottle_02a`] = {item = "trash_bottles", amount = 1, random = {use = false, min = 1, max = 3}},
[`prop_bottle_cognac`] = {item = "trash_bottles", amount = 1, random = {use = false, min = 1, max = 3}},
[`h4_prop_battle_whiskey_bottle_s`] = {item = "trash_bottles", amount = 1, random = {use = false, min = 1, max = 3}},
}
-- Money Reward For Each Clean
Config.EnableCleanReward = false -- | true -> enable, false -> disable | If you enable this option, when player clean a trash script auto give Config.CleanReward money
Config.CleanReward = 20
Config.CleanRewardPayType = 'bank'
-- The stage of recycling garbage
Config.RecyclerNoTargetKey = 38 -- [E] https://docs.fivem.net/docs/game-references/controls/
Config.RecyclerProductItem = 'recycler_product'
Config.RecyclerProductItemMultiplier = 1
Config.RecycleZones = {
{
coord = vector3(-212.0, -2566.36, 6.0),
width = 1.0,
length = 1.0,
heading = 0,
minZ = 6.15,
maxZ = 8.75,
icon = "fa-solid fa-recycle",
label = "Recycling Device",
distance = 1.5,
notargetdistance = 2.0,
},
-- If you want add more recycle device like this
}
Config.RecycleAnimationSettings = {
time = 10000,
model = `prop_cs_rub_binbag_01`,
dict = 'missfbi4prepp1',
anim = '_bag_walk_garbage_man',
bone = 57005,
pos = {0.12, 0.0, -0.05},
rot = {220.0, 120.0, 0.0},
deliver = {
dict = 'missfbi4prepp1',
anim = '_bag_throw_garbage_man',
exitdict = 'missfbi4prepp1',
exitanim = 'exit'
},
wait = {
dict = "random@shop_tattoo",
anim = "_idle_a",
flag = 1,
}
}
-- Sell Product
Config.SellNoTargetKey = 38 -- [E] https://docs.fivem.net/docs/game-references/controls/
Config.SellProductItemPrice = 100 -- | 1 Config.RecyclerProductItem sell price
Config.UseWertDialogWithSell = false -- | if you have wert-dialog system you can open this setting. Script auto created dialog like video.
Config.SellStageAddMoneyType = "cash" -- | "cash" or "bank"
Config.SellProductPoints = {
{
model = "s_f_y_factory_01",
coord = vector4(-253.24, -2591.17, 6.0, 90.56),
icon = "fa-solid fa-hand-holding-dollar",
label = "Sell Recycling Products",
-- Wert Dialog System Settings
question = "Do You Want to Sell Recycling Product ?",
answert_text_one = "Sell Recycling Products",
answer_text_one_color = nil, -- Now use default color if you want change
answer_text_two = "I'm Busy. [EXIT]",
answer_text_two_color = "indianred",
distance = 1.5,
-- No target
notargetdistance = 2.0,
}
}
Config.SellCompleteAnimation = {
dict = 'mp_common',
anim = 'givetake1_b',
flag = 16,
}
-- Zone and settings
Config.Zones = {
["tequila"] = {
job = "tequila",
trash_create_time = 1, -- Each This Minute Create New Trash
blip = {
active = false,
sprite = 79,
scale = 1.0,
color = 47,
label = "Clean Tequila",
coord = vector3(-553.62, 278.95, 82.18),
},
zone = {
polys = {
vector2(-559.47467041016, 278.62872314453),
vector2(-561.41259765625, 278.76947021484),
vector2(-543.54388427734, 275.83703613281),
vector2(-548.62744140625, 282.44229125977),
vector2(-548.00561523438, 291.14389038086),
vector2(-560.88470458984, 293.30905151367),
vector2(-578.30023193359, 295.21508789062),
vector2(-577.75720214844, 285.01538085938),
vector2(-570.62377929688, 284.52435302734),
vector2(-571.14294433594, 277.28311157227)
},
minZ = 70.0,
maxZ = 95.0,
},
trashcoords = {
{coord = vector4(-553.62, 278.95, 82.18, 213.71), trash_type = "trash"},
{coord = vector4(-558.05, 279.32, 82.18, 176.54), trash_type = "trash"},
{coord = vector4(-554.2, 281.47, 82.18, 328.0), trash_type = "trash"},
{coord = vector4(-554.24, 285.16, 82.18, 346.25), trash_type = "trash"},
{coord = vector4(-553.7, 288.91, 82.18, 353.32), trash_type = "trash"},
{coord = vector4(-556.98, 289.93, 82.18, 74.91), trash_type = "trash"},
{coord = vector4(-557.21, 285.4, 82.18, 170.57), trash_type = "trash"},
{coord = vector4(-559.71, 281.44, 82.18, 116.66), trash_type = "trash"},
{coord = vector4(-560.19, 284.5, 82.18, 50.47), trash_type = "bootle"},
{coord = vector4(-559.92, 287.1, 82.18, 353.34), trash_type = "bootle"},
{coord = vector4(-559.68, 289.45, 82.18, 46.47), trash_type = "bootle"},
},
},
["unicorn"] = {
job = "unicorn",
trash_create_time = 1, -- Each This Minute Create New Trash
blip = {
active = false,
sprite = 121,
scale = 1.0,
color = 48,
label = "Clean Unicorn",
coord = vector3(126.14, -1283.55, 29.28),
},
zone = {
polys = {
vector2(127.96802520752, -1299.1184082031),
vector2(115.01523590088, -1306.7087402344),
vector2(116.49108123779, -1309.4039306641),
vector2(105.14609527588, -1316.2827148438),
vector2(100.95397186279, -1317.8979492188),
vector2(84.672142028809, -1289.625),
vector2(99.499664306641, -1281.0001220703),
vector2(134.44123840332, -1274.4006347656),
vector2(143.01405334473, -1290.6187744141)
},
minZ = 25.0,
maxZ = 35.0,
},
trashcoords = {
{coord = vector4(126.14, -1283.55, 29.28, 204.91), trash_type = "trash"},
{coord = vector4(128.08, -1286.66, 29.28, 208.48), trash_type = "trash"},
{coord = vector4(127.54, -1289.81, 29.28, 165.02), trash_type = "trash"},
{coord = vector4(123.49, -1291.64, 29.28, 118.6), trash_type = "trash"},
{coord = vector4(118.01, -1294.54, 29.28, 115.48), trash_type = "trash"},
{coord = vector4(119.92, -1288.22, 28.27, 19.76), trash_type = "trash"},
{coord = vector4(117.07, -1283.51, 28.27, 36.72), trash_type = "trash"},
{coord = vector4(109.92, -1283.39, 28.26, 116.23), trash_type = "trash"},
{coord = vector4(104.55, -1286.29, 28.26, 120.49), trash_type = "bootle"},
{coord = vector4(110.87, -1292.81, 28.26, 122.78), trash_type = "bootle"},
{coord = vector4(111.98, -1287.78, 28.46, 36.52), trash_type = "bootle"},
{coord = vector4(108.52, -1289.55, 28.86, 120.22), trash_type = "bootle"},
{coord = vector4(104.18, -1291.99, 29.26, 118.7), trash_type = "bootle"},
},
},
["bahama"] = {
job = "bahama",
trash_create_time = 1, -- Each This Minute Create New Trash
blip = {
active = false,
sprite = 93,
scale = 1.0,
color = 27,
label = "Clean Bahama",
coord = vector3(-1395.05, -593.68, 30.32),
},
zone = {
polys = {
vector2(-1417.1435546875, -603.10186767578),
vector2(-1389.6318359375, -644.61157226562),
vector2(-1386.0773925781, -642.32659912109),
vector2(-1355.9167480469, -622.14593505859),
vector2(-1381.9106445312, -582.81176757812)
},
minZ = 25.0,
maxZ = 39.0,
},
trashcoords = {
{coord = vector4(-1395.05, -593.68, 30.32, 122.97), trash_type = "trash"},
{coord = vector4(-1394.55, -598.83, 30.32, 148.7), trash_type = "trash"},
{coord = vector4(-1396.33, -604.55, 30.32, 193.4), trash_type = "trash"},
{coord = vector4(-1394.58, -610.73, 30.32, 190.36), trash_type = "trash"},
{coord = vector4(-1392.2, -616.66, 30.82, 214.18), trash_type = "trash"},
{coord = vector4(-1387.09, -614.93, 30.82, 194.75), trash_type = "trash"},
{coord = vector4(-1386.84, -618.59, 30.82, 225.61), trash_type = "trash"},
{coord = vector4(-1382.62, -619.51, 30.82, 215.86), trash_type = "trash"},
{coord = vector4(-1386.32, -625.12, 30.82, 205.09), trash_type = "bootle"},
{coord = vector4(-1383.65, -628.87, 30.82, 213.67), trash_type = "bootle"},
{coord = vector4(-1379.13, -626.94, 30.82, 312.76), trash_type = "bootle"},
{coord = vector4(-1378.47, -619.41, 30.82, 94.66), trash_type = "bootle"},
{coord = vector4(-1379.52, -613.91, 30.82, 31.47), trash_type = "bootle"},
},
},
["lostmc"] = {
job = "lostmc",
trash_create_time = 1, -- Each This Minute Create New Trash
blip = {
active = false,
sprite = 348,
scale = 1.0,
color = 40,
label = "Clean Lost MC",
coord = vector3(983.05, -99.56, 74.85),
},
zone = {
polys = {
vector2(971.10729980469, -110.7585144043),
vector2(973.66522216797, -111.58264160156),
vector2(982.95684814453, -102.42799377441),
vector2(985.84649658203, -104.85934448242),
vector2(993.68200683594, -96.761085510254),
vector2(984.13903808594, -87.698081970215),
vector2(980.62615966797, -91.060028076172),
vector2(978.38275146484, -88.864570617676),
vector2(961.78332519531, -102.53086853027)
},
minZ = 70.0,
maxZ = 80.0,
},
trashcoords = {
{coord = vector4(983.05, -99.56, 74.85, 309.02), trash_type = "trash"},
{coord = vector4(989.86, -97.28, 74.85, 41.67), trash_type = "trash"},
{coord = vector4(981.9, -93.92, 74.85, 105.84), trash_type = "trash"},
{coord = vector4(979.65, -96.17, 74.85, 120.13), trash_type = "trash"},
{coord = vector4(974.42, -96.74, 74.87, 128.89), trash_type = "trash"},
{coord = vector4(975.58, -102.38, 74.85, 232.33), trash_type = "trash"},
{coord = vector4(977.45, -100.23, 74.85, 350.84), trash_type = "bootle"},
{coord = vector4(972.39, -99.51, 74.85, 217.63), trash_type = "bootle"},
{coord = vector4(977.0, -96.71, 74.85, 126.34), trash_type = "bootle"},
{coord = vector4(978.4, -92.92, 74.87, 119.52), trash_type = "bootle"},
{coord = vector4(984.88, -96.4, 74.85, 45.58), trash_type = "bootle"},
{coord = vector4(986.37, -99.58, 74.85, 314.45), trash_type = "bootle"},
},
},
["police"] = {
job = "police",
trash_create_time = 1, -- Each This Minute Create New Trash
blip = {
active = false,
sprite = 60,
scale = 1.0,
color = 3,
label = "Clean Lost MC",
coord = vector3(427.03, -984.49, 30.71),
},
zone = {
polys = {
vector2(412.49566650391, -965.60192871094),
vector2(412.15744018555, -1015.3544921875),
vector2(460.32623291016, -1015.6289672852),
vector2(458.99130249023, -1024.0773925781),
vector2(490.60641479492, -1022.3391113281),
vector2(489.65759277344, -960.60406494141)
},
minZ = 22.0,
maxZ = 40.0,
},
trashcoords = {
{coord = vector4(427.03, -984.49, 30.71, 291.26), trash_type = "trash"},
{coord = vector4(431.15, -975.3, 30.71, 275.89), trash_type = "trash"},
{coord = vector4(437.49, -980.04, 30.69, 284.22), trash_type = "trash"},
{coord = vector4(440.02, -983.59, 30.69, 172.27), trash_type = "trash"},
{coord = vector4(441.07, -989.63, 30.69, 181.3), trash_type = "trash"},
{coord = vector4(441.14, -974.46, 30.69, 278.98), trash_type = "trash"},
{coord = vector4(428.14, -980.33, 30.71, 338.44), trash_type = "bootle"},
{coord = vector4(432.09, -981.23, 30.71, 219.11), trash_type = "bootle"},
{coord = vector4(440.72, -979.83, 30.69, 276.92), trash_type = "bootle"},
{coord = vector4(441.69, -995.36, 30.69, 290.79), trash_type = "bootle"},
{coord = vector4(446.63, -993.12, 30.69, 277.66), trash_type = "bootle"},
{coord = vector4(446.86, -975.07, 30.69, 219.18), trash_type = "bootle"},
},
},
}
```
Editable Client Side
```lua
local QBCore = exports['qb-core']:GetCoreObject()
function CustomNotifVariation(text, ttype, time)
QBCore.Functions.Notify(text, ttype, time)
end
function ShowTextUI(text)
if Config.OxLib then
lib.showTextUI(text, {position = 'left-center'})
else
exports['qb-core']:DrawText(text, 'left')
end
end
function HideTextUI()
if Config.OxLib then
lib.hideTextUI()
else
exports['qb-core']:HideText()
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 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
QBCore.Functions.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)
```
lang.lua
```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!",
}
```
FINISH
Last updated