[Release] Garbage job (Can probably be used in any framework)

[Can someone move this to releases]
Hello! So i customized @glitchdetector 's https://github.com/glitchdetector/fivem_gd_bus_vrp and made it into a garbage job that can be used in any framework.

Installation

Put the onyx_garbagejob in resources and add onyx_garbagejob (You are of course allowed to change the name)

Tutorial on how to add locations

When you have added the resource and are ingame you should be able to do /loc and a message will pop up in the console

You need to copy it and put it in the client/main.lua under the trashboi table (DO NOT NAME IT ANYTHING AS IF YOU HAVE TO MANY BLIPS WITH NAMES IT WILL BREAK)

Tutorial on to add a way to get money for the trash

Go into server/main.lua and find http://prntscr.com/nyxsmv and then add your shit there, if you put for example givemoneyblabla(trash * 5)
it will give as much money as trash you have but times 5
[Example : so if you have 100 trash in your truck it will give $500 ]

Github Repo
Direct Download

/ DeOnyx

8 Likes

Please add video and more screenshots

Sure :slight_smile:


Basiclly drive around and collect points until your garbage truck is full and when you return to the area your started you can drop off all the trash and earn money for it

2 Likes

One suggestion… would be, make it so the user has to get out… and grab the bag… or if someone is riding on the back… for better immersion

1 Like

How do you get the script to give money for trash bags. I have really try but I can’t get it to work
oh BTW nice script :smiley:

1 Like

if you go in server/main.lua and find the eventhandler(“givemoneyfortrash”) and
do giveMoney(trash * 5), but change the giveMoney to your framework, if youre using vrp I can help you but if you are using esx then I cant

I am using vrp :smiley:

1 Like

You need to setup the script to have vrp stuff like usally, but under the givemoneyfortrash do

local user_id = vRP.getUserId({source})
vRP.giveMoney({user_id, trash * 5})

this will give you $5 for every trash

how to use this code?

im using vrp please help

I use vrp … I put it this way but when I complete the 100 garbage and when I am going to deliver them it does not give me money !! Do you have any solution?I put it this way but it doesn’t work for vrp !!

RegisterServerEvent(“givemoneyfortrash”)
AddEventHandler(“givemoneyfortrash”, function(trash)
local user_id = vRP.getUserId({source})
vRP.giveMoney({user_id, trash * 5})
– Do something when dropping of trash, like give money or exp
end)

can you send me the whole garbage job files?

https://pastebin.com/G1k0g3J6

oh i see, you havent made the file “vrp connected”
can you send me the __resource.lua?

It is the same as yours but I want that when I deliver the 100 packages of garbage they pay me poreso … I can not achieve that.

https://pastebin.com/UwU0xFbr

this should be your “__resource.lua” https://pastebin.com/JVpUJ77G
this should be your “server/main.lua” https://pastebin.com/kPRLBJuS

1 Like

I’m going to try and tell you if it worked

Alright :ok_hand:

if it worked and thanks …