[Release] [ESX] Trash Search & Deposit

Store and withdraw items from dumpsters around San Andreas!

Support will not be provided. All scripts released are working on my server at the time of release. I am using es_extended V1 final (1.2)

Github

Dependencies

bt-target
Addon Inventory

Additional

You must import the provided SQL into your database!
Add the following code into main.lua inside of your client folder of bt-target
Add the following code into main.lua inside of your client folder of bt-target

-- Dumstper Diving --
Citizen.CreateThread(function()
	local dumpsters = {
        1143474856,
		684586828,
		577432224,
		-206690185,
		682791951,
		1511880420,
		218085040,
		-58485588,
		666561306,
		-1587184881,
		1329570871
    }
    AddTargetModel(dumpsters, {
        options = {
            {
                event = "esx_TrashSearch:Search",
                icon = "fas fa-trash",
                label = "Search",
            },
			{
                event = "esx_TrashSearch:Deposit",
                icon = "fas fa-angle-double-down",
                label = "Deposit",
            },
        },
        job = {"all"},
        distance = 2.5
    })
end)

Preview

8 Likes

Great job!

1 Like

so you gotta deposit all items? or a way to have them find some items in there too?

There are two options, either you can use preset items where it will select a random item from the list, or use player deposit

i wonder if there is a way to do both.
hmmm thank you thou, great free release! <3

1 Like

I will look into see if I can figure out a way to combine the two

1 Like

dope!

1 Like

Awesome script! Great work!!

1 Like

dont work for me, use esx 1.0 final
bt-target is installed

So an issue i found straight away

1 - When searching a dumpsters, you can search over and over and over and constantly receive items

1 Like

The script was more focused on the player deposit; however, I will look into getting a cool-down on search implemented if not using the player deposit!

1 Like

I recommend securing the event “esx_TrashSearch:GiveItem” because cheaters can abuse that and get any item

can u help me ?

nice work buddy can you make it for invenory hud maybe

I had try with esx 1.1 and I got error invalid vector index 4 on client side and the server side server/main.lua 10 (field ‘canCarryItem’)

the fline of my side is don’t work is
local dumpster = ESX.Game.GetClosestObject(GetEntityCoords(PlayerPedId()))

my ex_extended give my a invalid vector index:4

work like a charm for me ^^ ty ----> V1 final (1.2)

Hey can someone send me the version of es_extended that makes the script work it doesn’t seem to work with mine it would be nice if someone could send me a link of a version that works with the script

This needs to be put in immediately! Players can just sit at 1 dumpster and search for unlimited items.

1 Like

Fixed where the dumpster deletes after the player searches it! Available now on Github!

1 Like

I have just updated this on Github where the dumpster will delete after being searched if using the preset items!

1 Like