ESX • QBCore • Qbox compatible
Instant download
Updates included
Discord support
Secure checkout
Installation Instructions for gs_metaldetectors
Follow these steps to properly install and configure your new resource:
-
Download the Resource
- Go to portal.cfx.re
-
Navigate to Assets > Granted Assets >
gs_metaldetectors - Download the resource
-
Extract the Files
-
Open the downloaded
.zipfile -
Inside, you'll find a folder named
gs_metaldetectors -
Move the entire
gs_metaldetectorsfolder into your desired server resources folder (e.g.,/resources/[scripts])
-
Open the downloaded
-
Add to Server Configuration
- Open your
server.cfg -
Add the following line:
ensure gs_metaldetectors
- Open your
-
Restart the Server
- Restart your FiveM server (Important!)
-
Configure the Script (Optional)
- Navigate to
gs_metaldetectors/config.lua - Edit the configuration options to fit your server's needs
- Navigate to
Additional documentation
Saving placed metal detectors to the database
To persist placed metal detectors across server restarts:
- Set
Config.SavePlacedDetectorsToDatabase = trueinconfig.lua. - Run
insert.sqlto create thegs_metal_detectorstable. - In
fxmanifest.lua, uncomment'@oxmysql/lib/MySQL.lua'in theserver_scriptssection.
Placed detectors are then stored (x, y, z, heading) and respawned on resource start. Removing a detector via the target option also removes it from the database.