[ESX] Onyx Dumpster Diving

does this have a selling feature for some items you find in the dumpsters?

I wouldnt recommend using this resource. It isn’t optimized and your FPS will suffer (10-25FPS). I recently found this out while going through all my resources.

2 Likes

No, you have to make a sell shop on your own to do that, But when you first manage to do that your players would love you.

I Have created a very big system to this, added alot of new items into the dumpers and then some hidden pawn shops arround the world.

It’s indeed not optimized at all. Currently in the works of optimizing it myself.

Hi

Is there a possibility to wrap the searching part in its own Event? Something like this?

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        if canSearch then
            local ped = GetPlayerPed(-1)
            local pos = GetEntityCoords(ped)
            local dumpsterFound = false

            for i = 1, #dumpsters do
                local dumpster = GetClosestObjectOfType(pos.x, pos.y, pos.z, 1.0, dumpsters[i], false, false, false)
                local dumpPos = GetEntityCoords(dumpster)
                local dist = GetDistanceBetweenCoords(pos.x, pos.y, pos.z, dumpPos.x, dumpPos.y, dumpPos.z, true)

                if dist < 1.8 then
                    DrawText3Ds(dumpPos.x, dumpPos.y, dumpPos.z + 1.0, 'Press [~y~H~w~] to dumpster dive')
                    if IsControlJustReleased(0, 74) then
                        for i = 1, #searched do
                            if searched[i] == dumpster then
                                dumpsterFound = true
                            end
                            if i == #searched and dumpsterFound then
                                exports['mythic_notify']:DoHudText('error', 'This dumpster has already been searched')
                            elseif i == #searched and not dumpsterFound then
								TriggerEvent("onyx:searchDumpster")
                            end
                        end
                    end
                end
            end
        end
    end
end)

RegisterNetEvent("onyx:searchDumpster")
AddEventHandler("onyx:searchDumpster", function()
	exports['mythic_notify']:DoHudText('inform', 'You begin to search the dumpster')
    startSearching(searchTime, 'amb@prop_human_bum_bin@base', 'base', 'onyx:giveDumpsterReward')
    TriggerServerEvent('onyx:startDumpsterTimer', dumpster)
    table.insert(searched, dumpster)
end)

Something along those lines? If so, am I missing any parameters that it requires? Like the removeDumpster is passed the object “variable” etc.

i have an issue where i get an item everytime i check the dumpster, i removed alot of items and set the chance to 1 for all and still get something everytime, id like to be able to find nothing at times

1 Like

anyone know how to get this working

Worked out of the box. Love it.

Curious what people have used for a sell shop? Pawn or what not.

Looking for suggestions.

someone who has this optimized script please?

what you mean?

that has low resmon because it consumes a 0.40

3 Likes

yeah i got mine low i can send it

any one know how to get this script working?

how much did you get it loweret?

Does anyone have this optimized script that can make it available please?

good evening the download link and more available

hey, anyone have this script connected with qtarget?

1 Like

Page Not Found @HighHowdy

1 Like

Unlisted until download is back

It would be awsome with 3rd eye. Better for performace too.