[RELEASE] [ESX] r3_prospecting

r3_prospecting:
Prosepecting handler for ESX.

This is a handler for glitchdetectors Prospecting mini-game. It is made to work with ESX so it will give you the items you dug up in your inventory. You will have to find a way yourself to give players the detector item. Items found can be sold using my pawnshop plugin r3_pawnshop, you can also find another way to sell them or to do something with them yourself.

Features

  • Randomly generated treasure within a pre-defined area
  • Infinitely re-generating treasure
  • Multiplayer support
  • Items found come in your inventory

Download

Installation details can be found on the github as well. Make sure you install all the dependencies otherwise it will cause errors.

Configuration
In the config.lua you can change the blip text and blip sprite for now. Hopefully I will be able to add more configuration options in the future. If you have any additions to this plugins make a pull request and I’ll check it out.

Preview
Here’s a preview of the plugin:

And a screenshot:


QBCore
Due to popular demand, I have made a new branch on the GitHub repository containing updated code that works with the latest version of QBCore. This version uses minor parts of the prospecting with treasure map script. Check it out here:


My other resources
If you like this resource, you might like some of my other work as well:

[ESX] [QBCORE] Prospecting with treasure map
[ESX] [QBCORE] Food Delivery like Uber Eats
[ESX] [QBCORE] Location Items
[ESX] [QBCORE] Evidence Storage
[ESX] [QBCORE] Delivery job for different jobs

12 Likes

Why not post this on the example post seeing how its less then 8 lines added…

Amazing, thank you!

So i have tested this out & sadly its only setup for weight system inventory what i do not use so when trying to collect the item i get console errors and i also get no items after digging them up. Also after you find something and dig it up the resource bug’s out and you then loose the markers around the metal detector and even if you put the metal detector away and pull it back out you still don’t get the marker’s back not sure if its because the item error or what but maybe you could make a snippet for people what don’t use the weight inventory item’s limit so then they can simply just change the part of code asking for weight limit. :slight_smile:

he doesn’t give any item

Thanks for the feedback, I will look into the item limit thing but I don’t think I’ll be making something like that soon since its for a much older version of ESX. Probably isn’t that hard to change so maybe if I got some spare time. I didn’t have the problem with the markers last time but shall test it tomorrow morning and hopefully fix it if the error happens for me as well.

1 Like

Did you get any errors in client and server console?

there is no error

Then I sadly cant help you, it works for me so there has to be something wrong at your end. Maybe try reinstalling the plugin and all the dependencies.

great work!

This is the error i get when i dig. (I apologize for my bad/no formatting.)

SCRIPT ERROR: @r3_prospecting/scripts/sv_locations.lua:112: attempt to call a nil value (field ‘canCarryItem’)

HandleProspectingPickup (@prospecting/scripts/sv_prospecting.lua:70)
handler (@prospecting/scripts/sv_prospecting.lua:160)

Did you change anything in the script or are you using an older version of ESX?

I’m using the version that is available for quick install on Zap-Hosting. I didn’t catch the version number but i’m sure its the old version.

Does it have weight or limit for items?

Limit.

Ah yes that is the old version, don’t know why zap didn’t update it tho. Sadly that old version isn’t compatible with this, I see more people using the limit system so I will try to make a compatible version soon.

For me it works, so it must be from the older esx version, I shall try to make a compatible version for the older esx soon as I see more people using it.

2 Likes

Here is some solution on your problems with old versions… I use it myself and here is code, just replace it server side…

–zvonjara edits–

function FoundItem(player, data)
local xPlayer = ESX.GetPlayerFromId(player)
local item = xPlayer.getInventoryItem(data.item)

if item.limit ~= -1 and item.count >= item.limit then
		else
	--    TriggerClientEvent("notifikacije:client:sendNotification", player, "Pronasli ste " .. data.label .. "!", "success", 5000)
		xPlayer.addInventoryItem(data.item, 1)
end end

Is it possible to add more prospecting locations around the map. I want at least 2 for what I am using this for

Not out of the box, but you can edit the script to make it do that.