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:

  1. Download the Resource
    • Go to portal.cfx.re
    • Navigate to Assets > Granted Assets > gs_metaldetectors
    • Download the resource
  2. Extract the Files
    • Open the downloaded .zip file
    • Inside, you'll find a folder named gs_metaldetectors
    • Move the entire gs_metaldetectors folder into your desired server resources folder (e.g., /resources/[scripts])
  3. Add to Server Configuration
    • Open your server.cfg
    • Add the following line:
      ensure gs_metaldetectors
  4. Restart the Server
    • Restart your FiveM server (Important!)
  5. Configure the Script (Optional)
    • Navigate to gs_metaldetectors/config.lua
    • Edit the configuration options to fit your server's needs
Additional documentation

Saving placed metal detectors to the database

To persist placed metal detectors across server restarts:

  1. Set Config.SavePlacedDetectorsToDatabase = true in config.lua.
  2. Run insert.sql to create the gs_metal_detectors table.
  3. In fxmanifest.lua, uncomment '@oxmysql/lib/MySQL.lua' in the server_scripts section.

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.