An updated metal detector script, with configurable items, created systems, easy drag and drop
https://www.youtube.com/watch?v=Uk-hqCwVUxI
Make sure you add to your items.lua (qb-core/shared/items.lua)
["metaldetector"] = { ["name"] = "metaldetector", ["label"] = "Metal Detector", ["weight"] = 200, ["type"] = "item", ["image"] = "metaldetector.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = '*beep*, *beep*', }, ["treasuremap"] = { ["name"] = "treasuremap", ["label"] = "Treasure Map", ["weight"] = 100, ["type"] = "item", ["image"] = "treasuremap.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = 'Shrivelled up paper', },
Make sure to also add everything in the images folder to your inventory script's image folder.
Big Thanks to PlasmaFPS for allowing me to use and repurpose his code! Custom Prop made by Vartanyan