🕵️NOXEN METAL DETECTOR
🔍 Metal Detector Script for FiveM
A comprehensive and realistic metal detector script for FiveM servers, featuring advanced detection mechanics, multiple digging tools, particle effects, and multi-language support.
📸 Screenshots
✨ Features
🎯 Core Features
Realistic Metal Detection: Advanced proximity-based detection system with visual and audio feedback
Multiple Digging Tools: Support for trowel, pickaxe, and shovel with unique animations and sounds
Framework Support: Compatible with both ESX and QBCore frameworks
Multi-Language System: JSON-based localization (French, English, Spanish included)
Zone-Based Detection: Configurable search zones with ox_lib integration
Particle Effects: Realistic dirt particles synchronized with digging animations
Progressive Marker System: Distance-based color-coded markers with pulsation effects
🎨 Visual & Audio
Dynamic Markers: Color-changing proximity markers (Gray → Green → Yellow → Orange → Red)
Synchronized Audio: Tool-specific sound effects perfectly timed with animations
Particle System: Realistic dirt-throwing effects during excavation
Modern UI: Clean notification system with fade effects
🛠️ Customization
Extensive Configuration: Over 50+ configurable options
Custom Items: Define your own discoverable items with rarity percentages
Zone Management: Create custom search areas with specific boundaries
Tool Customization: Modify digging tool properties and animations
Sound Control: Adjust detection beeps, volumes, and frequencies
📋 Requirements
FiveM Server (Latest version recommended)
ESX or QBCore framework
🚀 Installation
1. Framework Configuration
Edit shared/config.lua
and set your framework:
Config.core = "ESX" -- or "QBCore"
2. Server Configuration
Add to your server.cfg
:
ensure noxen_metaldetector
3. Item Configuration
Add the metal detector item to your shop or admin panel.
⚙️ Configuration
Basic Setup
-- Framework selection
Config.core = "ESX" -- ESX or QBCore
-- Detection settings
Config.targMin = 15 -- Minimum target distance
Config.targMax = 50 -- Maximum target distance
Config.volume = 0.3 -- Audio volume (0.0 - 1.0)
-- Visual settings
Config.maxMarkerSize = 1.5
Config.minMarkerSize = 0.3
Zone Configuration
Config.useOxZones = true -- Enable ox_lib zones
Config.searchZones = {
{
name = "Beach Area",
coords = vector3(100.0, 200.0, 30.0),
radius = 150.0,
blip = true
}
}
Item Configuration
Config.Items = {
{
object = "item",
name = "goldbar",
random = 5, -- 5% chance
amount = 1
},
{
object = "money",
name = "cash",
random = 15, -- 15% chance
amount = 250
}
}
🎮 How to Use
For Players
Acquire Metal Detector: Purchase or receive a metal detector item
Find Search Zone: Go to designated search areas (marked with blips)
Activate Detector: Use the metal detector item from inventory
Follow Markers: Watch for color-coded proximity markers:
🔘 Gray: Very far from target
🟢 Green: Getting closer
🟡 Yellow: Close to target
🟠 Orange: Very close
🔴 Red: Target nearby
Listen for Beeps: Audio frequency increases as you get closer
Dig: Press E when markers turn red to start digging
Collect Items: Pick up discovered items
Controls
E: Start digging when close to target
X: Stop detection and FAQ
H: Toggle help information
Mouse: Look around while detecting
🔧 Advanced Configuration
Custom Digging Tools
Config.propAttachments = {
["prop_cs_trowel"] = {
bone = 28422,
offset = vector3(0.0, 0.0, 0.0),
rotation = vector3(0.0, 0.0, 0.0),
animDict = "weapons@first_person@aim_rng@generic@projectile@thermal_charge@",
animName = "plant_floor"
}
}
Audio Customization
Config.pulseAndSound = {
[1] = { -- Very far
distanceToZone = 50,
color = {128, 128, 128}, -- Gray
frequency = 4000,
sizeChangeRate = 0.005
},
[7] = { -- Very close
distanceToZone = 2,
color = {255, 0, 0}, -- Red
frequency = 500,
sizeChangeRate = 0.03
}
}
Multi-Language Support
Edit locales/translations.json
:
{
"fr": {
"start_detection": "Détection activée",
"stop_detection": "Détection arrêtée"
},
"en": {
"start_detection": "Detection started",
"stop_detection": "Detection stopped"
}
}
🔄 API Events
Client Events
-- Start detection manually
TriggerEvent('metal_detector:start')
-- Stop detection
TriggerEvent('metal_detector:stop')
-- Object found
RegisterNetEvent('metal_detector:foundObject')
AddEventHandler('metal_detector:foundObject', function(prop, items)
-- Handle found object
end)
Server Events
-- Add item to player
TriggerServerEvent('metal_detector:addItem', itemName, amount)
-- Add money to player
TriggerServerEvent('metal_detector:addMoney', amount)
🐛 Troubleshooting
Common Issues
Metal detector doesn't start:
Check if player has the item in inventory
Verify framework configuration
Ensure player is in a valid search zone
No sounds playing:
Check Config.volume setting
Verify sound files are not corrupted
Test with different audio settings
Particles not showing:
Update graphics drivers
Check FiveM graphics settings
Verify particle system is enabled
Zone detection not working:
Ensure ox_lib is properly installed
Check zone coordinates in config
Verify Config.useOxZones is true
Debug Mode
Enable debug mode for troubleshooting:
Config.debug = true
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📞 Support
Getting Help
Check Documentation: Review this README thoroughly
Check Logs: Examine server/client console output
Verify Configuration: Ensure proper setup
Test Functions: Verify custom function implementation
Support Channels
Discord: Join Noxen Community
Issues: Join Noxen Community
🙏 Credits
Script Author: HARPIK
Framework: ESX/QBCore Teams
Dependencies: ox_lib Team
📊 Statistics
Languages Supported: 3 (French, English, Spanish)
Digging Tools: 3 (Trowel, Pickaxe, Shovel)
Configuration Options: 50+
Zone Types: Unlimited
Item Types: Unlimited
🚀 Developed by HARPIK Version 1.0.0 - Professional Metal Detector Script
Last updated