💻Installation
Dependencies
QBCore
You will need the latest version of qb-core.
Extract the contents of the archive to your resources folder.
Start the resource near the top of your resources in your server.cfg.
QB RADIAL MENU
You will need the latest version of qb-radialmenu
Extract the contents of the archive to your resources folder.
Start the resource near the top of your resources in your server.cfg.
Inventory setup
QB-INVENTORY or PS-INVENTORY
1 - Paste the code below in qb-core/shared/items.lua
b_glasses = { name = 'b_glasses', label = 'Broke Glasses', weight = 100, type = 'item', image = 'b_glasses.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Broke Glasses...' },
b_tv = { name = 'b_tv', label = 'Broke TV', weight = 100, type = 'item', image = 'b_tv.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Broke TV...' },
b_laptop = { name = 'b_laptop', label = 'Broke Laptop', weight = 100, type = 'item', image = 'b_laptop.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Broke Laptop...' },
b_camera = { name = 'b_camera', label = 'Broke Camera', weight = 100, type = 'item', image = 'b_camera.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Broke Camera...' },
b_phonefix = { name = 'b_phonefix', label = 'Broke Phone', weight = 100, type = 'item', image = 'b_phonefix.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Broke Phone...' },
2 - Copy the images from [images] and paste them into qb/ps-inventory/html/images.
OX-INVENTORY
1 - Paste the code below under ox_inventory/data/items.lua
["b_laptop"] = {
label = "Broke Laptop",
weight = 100,
stack = true,
close = true,
description = "Broke Laptop...",
client = {
image = "b_laptop.png",
}
},
["b_camera"] = {
label = "Broke Camera",
weight = 100,
stack = true,
close = true,
description = "Broke Camera...",
client = {
image = "b_camera.png",
}
},
["b_glasses"] = {
label = "Broke Glasses",
weight = 100,
stack = true,
close = true,
description = "Broke Glasses...",
client = {
image = "b_glasses.png",
}
},
["b_tv"] = {
label = "Broke TV",
weight = 100,
stack = true,
close = true,
description = "Broke TV...",
client = {
image = "b_tv.png",
}
},
["b_phonefix"] = {
label = "Broke Phone",
weight = 100,
stack = true,
close = true,
description = "Broke Phone...",
client = {
image = "b_phonefix.png",
}
},
2- Copy the images from [images] and paste them into ox_inventory/web/images.
QS-INVENTORY
1- Add the code below into qs-inventory/shared/items.lua:
['b_laptop'] = {
['name'] = 'b_laptop',
['label'] = 'Broke Laptop',
['weight'] = 0,
['type'] = 'item',
['image'] = 'b_laptop.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = false,
['combinable'] = nil,
['description'] = 'Broke Laptop...'
},
['b_camera'] = {
['name'] = 'b_camera',
['label'] = 'Broke Camera',
['weight'] = 0,
['type'] = 'item',
['image'] = 'b_camera.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = false,
['combinable'] = nil,
['description'] = 'Broke Camera...'
},
['b_glasses'] = {
['name'] = 'b_glasses',
['label'] = 'Broke Glasses',
['weight'] = 0,
['type'] = 'item',
['image'] = 'b_glasses.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = false,
['combinable'] = nil,
['description'] = 'Broke Glasses...'
},
['b_tv'] = {
['name'] = 'b_tv',
['label'] = 'Broke TV',
['weight'] = 0,
['type'] = 'item',
['image'] = 'b_tv.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = false,
['combinable'] = nil,
['description'] = 'Broke TV...'
},
['b_phonefix'] = {
['name'] = 'b_phonefix',
['label'] = 'Broke Phone',
['weight'] = 0,
['type'] = 'item',
['image'] = 'b_phonefix.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = false,
['combinable'] = nil,
['description'] = 'Broke Phone...'
},
2- Copy the images from [images] and paste them into qs-inventory/html/images.
RADIAL MENU
QB RADIAL MENU
1 - Add the code below into the qb-radialmenu/client/main.lua
RegisterNetEvent("isGarbage")
AddEventHandler("isGarbage", function(bool)
if bool then
AddOption({
id = 'SanitaireVehicles',
title = 'Vehicle List',
icon = 'car',
type = 'client',
event = 'zat-garbagejob:client:VehicleList',
shouldClose = true
}, 'SanitaireVehicles')
AddOption({
id = 'SanitaireOpenMenu',
title = 'Groups',
icon = 'people-group',
type = 'client',
event = 'zat-groups:client:OpenUi',
shouldClose = true
}, 'SanitaireOpenMenu')
AddOption({
id = 'SanitaireGenerate',
title = 'New Area',
icon = 'location-pin',
type = 'client',
event = 'zat-garbagejob:client:GenerateNewLocation',
shouldClose = true
}, 'SanitaireGenerate')
else
RemoveOption('SanitaireVehicles')
RemoveOption('SanitaireOpenMenu')
RemoveOption('SanitaireGenerate')
end
end)
OTHER RADIAL MENUS
1 - Add the code below into the top of your radialmenu script /config.lua :
local isGarbage = false
2- Add the code below into the bottom of your radialmenu script/config.lua :
RegisterNetEvent("isGarbage") -- these are all up to you and your job system, if person become Judge, script will see him as Judge too.
AddEventHandler("isGarbage", function(bool)
isGarbage = bool
end)
3- Depending on your radial menu :
3-1- if it uses rootMenuConfig then add the code below under rootMenuConfig :
{
id = "Sanitaire",
displayName = "Sanitaire",
icon = "#recycle",
enableMenu = function()
return isGarbage
end,
subMenus = {"Sanitaire:Vehicles", "Sanitaire:OpenMenu", "Sanitaire:Generate"}
},
3-2- If it uses newSubMenus then then add the code below under newSubMenus :
['Sanitaire:Vehicles'] = {
title = "Vehicle List",
icon = "#vehicle-vehicleList",
functionName = "zat-garbagejob:client:VehicleList" -- must be client event, work same as TriggerEvent('emotes:OpenMenu')
},
['Sanitaire:OpenMenu'] = {
title = "Groups",
icon = "#prisoner-group",
functionName = "zat-groups:client:OpenUi" -- must be client event, work same as TriggerEvent('emotes:OpenMenu')
},
['Sanitaire:Generate'] = {
title = "New Area",
icon = "#k9-huntfind",
functionName = "zat-garbagejob:client:GenerateNewLocation" -- must be client event, work same as TriggerEvent('emotes:OpenMenu')
},
QBX RADIAL MENU
Add the code below at the bottom of client/main.lua
RegisterNetEvent("isGarbage")
AddEventHandler("isGarbage", function(bool)
if bool then
addOption({
id = 'SanitaireVehicles',
label = 'Vehicle List',
icon = 'circle-exclamation',
onSelect = function ()
TriggerEvent('zat-garbagejob:client:VehicleList')
lib.hideRadial()
end
}, 'SanitaireVehicles')
addOption({
id = 'SanitaireOpenMenu',
label = 'Groups',
icon = 'circle-exclamation',
onSelect = function ()
TriggerEvent('zat-groups:client:OpenUi')
lib.hideRadial()
end
}, 'SanitaireOpenMenu')
addOption({
id = 'SanitaireGenerate',
label = 'New Area',
icon = 'circle-exclamation',
onSelect = function ()
TriggerEvent('zat-garbagejob:client:GenerateNewLocation')
lib.hideRadial()
end
}, 'SanitaireGenerate')
else
removeOption('SanitaireVehicles')
removeOption('SanitaireOpenMenu')
removeOption('SanitaireGenerate')
end
end)
NPC DIALOG
ADD THIS TO THE ZAT DIALOG CONFIG
{
ped = 's_m_y_garbage',
anim = 'CODE_HUMAN_MEDIC_TIME_OF_DEATH',
coords = vector4(-322.08, -1539.33, 26.73, 272.88),
job = "all", -- { ["police"] = 0, ["ambulance"] = 0} if you are using target
gang = "all", -- { ["ballas"] = 2, ["thelostmc"] = 0} if you are using target
groups = "all", -- { ["police"] = 2, ["ambulance"] = 0} if you are using intearaction
firstname = 'LEO',
lastname = 'EARTHWELL',
rep = 0,
mission = 'Garbage Job',
text = 'Nice To see you again, What can I do for you?',
buttons = {
{
text = 'Sign in/out',
shop =false,
rep = 0,
action= {
isServer= false,
event= 'zat-garbagejob:client:ToggleSingin',
data= {}
}
},
{
text = 'Join/Create Group',
shop =false,
rep = 0,
action= {
isServer= false,
event= 'zat-groups:client:OpenUi',
data= {}
}
},
{
text= 'I want to work',
answer ='Ready for a day of hard work?',
buttons={{
text = 'yes',
shop =false,
rep = 0,
action= {
isServer= false,
event= 'zat-garbagejob:client:StartWorking',
data= {}
}
},
{
text = 'Leave Conversation',
shop =false,
rep = 0,
action= {
isServer= false,
event= 'zat-dialog:client:HideUi',
data= {}
}
}
}
},
{
text = 'Work Clothes',
shop =false,
rep = 0,
action= {
isServer= false,
event= 'zat-garbagejob:client:Clothes',
data= {}
}
},
},
items={}
},
ENSURE RESOURCES
Last updated