Glitched Scripts
Metal Detecting

Using the detector

Scan, dig, battery, LCD HUD, and hotspot zones.

Use a detector item to equip. Walk and face the signal. Dig when the LCD locks on. Walkthrough: Using the detector.

Metal detecting

Player flow

  1. Use a detector item (metaldetector, metaldetector_adv, or metaldetector_pro). Use it again to put the detector away.
  2. Walk. Face the beep. The bar fill climbs as you get closer and face the site (Config.Scan.facingDegrees).
  3. When the prompt says [E] Dig, press E. The server awards a loot drop from Config.Loot.
  4. If the LCD shows NO PWR, use a battery item while the detector is still equipped.

You cannot start in a vehicle. Entering a vehicle or going down unequips the detector.

Digging

Controls

Defaults from Config.Scan. These are GTA control indexes, not ox_lib keybinds.

ControlDefaultAction
digControl38 (E)Dig when in range
stopControl75 (F)Put the detector away
audioControl140 (R)Toggle scanner beeps

LCD HUD

The NUI LCD shows signal bars, charge, detector label, and a material reading when a site is identified.

Readings: SCRAP, COPPER, STEEL, PARTS, TECH, SILVER, GOLD. Strings live in locales/*.json under ui.*.

Animated scanner UI

Dead battery: bars drop to zero, reading is NO PWR, and digging is blocked until you install a battery.

Detectors and battery

Three bundled detectors. Higher tiers scan farther and drain slower.

ItemLabelRangeDrain per tick
metaldetectorBasic Detector1.03.0
metaldetector_advAdvanced Detector1.252.0
metaldetector_proPro Detector1.51.0

Charge is stored on the item (metadata.charge / info.charge). Config.Battery.installCharge (default 100) is written when a battery is installed. Drain ticks while scanning (Config.Battery.drainIntervalMs).

Use a battery only while a detector is equipped.

Item paste-in: Items.

Zones and loot

Sites spawn in Config.Zones. type = 'hotspot' zones bias toward the valuable loot pool. Optional map blips (Config.HotspotBlips) can require a detector in hand.

Easy loot zones

Loot rolls common / uncommon / valuable from Config.Loot.bands. Each drop is { item, count, weight, reading }. Change spawn names there if your inventory uses different items. Skill hooks can scale the bands: Integrations.

On this page