# Installation

1. <mark style="color:yellow;">**Download & Extract**</mark>
   * Obtain the script (e.g., from Tebex or a Git repo).
   * Place the folder in your FiveM `resources` directory:

     ```bash
     resources/[local]/advanced_metaldetector
     ```
   * Rename if needed.
2. <mark style="color:yellow;">**Add to Server Config**</mark>

   ```cfg
   ensure advanced_metaldetector
   ```

   * Change `advanced_metaldetector` if your folder has another name.
3. <mark style="color:yellow;">**Dependencies**</mark>
   * Ensure **ESX** (`es_extended`) or **QBCore** (`qb-core`) is started before this script if you set `Config.Framework = "auto"`.
   * MySQL or an equivalent DB connector is required for storing tasks, scoreboard data, or item references.

```sql
INSERT IGNORE INTO items (name, label, weight) VALUES ('metal_detector','Metal Detector',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('pizza','Pizza',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('icedtea','Iced Tea',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('fries','Fries',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('energy','Energy Drink',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('jewelry','Jewelry',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('rock','Rock',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('gold','Gold Nugget',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('bone','Bone',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('coin','Ancient Coin',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('battery','Battery',1);
INSERT IGNORE INTO items (name, label, weight) VALUES ('shovel','Shovel',1);

```
