> For the complete documentation index, see [llms.txt](https://elena-scripts.gitbook.io/elenascripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elena-scripts.gitbook.io/elenascripts/jobs-and-activities/mining-job.md).

# Mining Job

## 🪨 Advanced Mining System

> **Version 3.0.0** | The most complete mining experience for FiveM

A fully featured, production-ready mining job script with advanced events, anti-exploit protection, and seamless multi-framework support.

***

### 🎯 Supported Frameworks

| Framework  | Status      | Version      |
| ---------- | ----------- | ------------ |
| QBCore     | ✅ Supported | All versions |
| ESX Legacy | ✅ Supported | 1.10.0+      |

### 📦 Supported Inventories

| Inventory     | Status            |
| ------------- | ----------------- |
| ox\_inventory | ✅ Fully Supported |
| qb-inventory  | ✅ Fully Supported |
| ESX default   | ✅ Fully Supported |

### 🎯 Supported Target Systems

| Target System | Status              |
| ------------- | ------------------- |
| ox\_target    | ✅ Fully Supported   |
| qb-target     | ✅ Fully Supported   |
| DrawText3D    | ✅ Built-in fallback |

***

### 📋 Dependencies

#### Required

* **ox\_lib** - UI and utility library
* **oxmysql** - Database connection
* **QBCore** or **ESX Legacy** - Framework

#### Optional

* **ox\_target** or **qb-target** - Target interaction
* **ox\_inventory** or **qb-inventory** - Inventory system

***

### ✨ Features

#### ⛏️ Core Mining System

* 🪨 Dynamic rock spawning with realistic distribution
* ⛏️ Skill-based mining with ox\_lib skillcheck
* 🎬 Realistic mining animations with pickaxe attachment
* ✨ Particle effects for immersion
* 🎯 5 unique ore types (Iron, Copper, Gold, Diamond, Emerald)
* 🏆 Rarity system (Common, Uncommon, Rare, Legendary)

#### 🏭 Processing System

* 🔥 Convert raw ores into refined bars
* 💎 Refine raw gems into polished jewels
* ⚙️ Configurable recipes with custom durations
* 📊 Progress bar with skill check

#### 💰 Dynamic Economy

* 📈 Time-based market fluctuation (peak hours)
* 🌙 Night penalty for late-night selling
* 🎁 Bulk sell bonuses up to **+15%**
* 💵 Configurable min/max prices per item

#### 🛒 Shop System

* 👤 NPC-based pickaxe shop
* 🔨 4 different tools (Basic, Iron, Diamond + Gas Mask)
* 💳 Cash/Bank payment options
* 📦 Auto-inventory validation

#### 📊 Progression System

* ⭐ XP & Level system (up to Level 50)
* 📈 Configurable XP curves
* 🏅 Daily/Weekly/Monthly leaderboards
* 📉 Statistics tracking per player

#### 🌍 World Events (8 Total)

| Event             | Effect                  | Duration |
| ----------------- | ----------------------- | -------- |
| 🌠 Meteor Crash   | +200% rare ore chance   | 10 min   |
| ⚡ Happy Hour      | 2x ore drops            | 2 hours  |
| 🎁 Treasure Chest | Hidden loot in mines    | 20 min   |
| 🎉 Weekend Bonus  | +25% ores, +50% XP      | Sat-Sun  |
| 🌍 Earthquake     | Screen shake + 2x drops | 5 min    |
| 💎 Rich Vein      | Bonus rare ores         | 10 min   |
| ☠️ Toxic Gas      | Damage without mask     | 5 min    |
| 🔥 Mining Frenzy  | 3x XP + 2.5x ores       | 15 min   |
| 🌃 Black Market   | 2x sell prices          | 10 min   |

#### 🛡️ Anti-Exploit Protection

* ⏱️ Action cooldowns (anti-spam)
* 📍 Server-side distance validation
* 🔧 Tool verification system
* 🚨 Exploit attempt logging
* 🔨 Auto-kick option

#### 🎛️ Admin Panel

* 📋 ox\_lib menu interface
* 🎮 Event management (start/stop)
* 👥 Player management (level/XP/items)
* 📊 Server statistics
* 🗑️ Player data reset

#### 🌐 Internationalization

* 🇬🇧 English
* 🇹🇷 Turkish
* 🌍 Easy to add new languages
* 🔄 Locale fallback system

#### 🔧 Integration & Logging

* 📡 Multi-category Discord webhooks
* 🗄️ Optimized SQL queries
* 🎨 Customizable UI elements
* 📝 Detailed configuration options

***

### ⚡ Performance

| State              | Resource Monitor  |
| ------------------ | ----------------- |
| 🟢 Idle            | **0.00ms**        |
| 🟡 Active mining   | **0.01 - 0.02ms** |
| 🟠 NPC area (200m) | **0.02 - 0.04ms** |
| 🔴 Heavy event     | **0.05ms** max    |

**Optimized for high-population servers** (200+ players tested)

***

### 🚀 Quick Start

#### Installation Steps

1. Download the resource
2. Place into `resources/[scripts]/`
3. Import `sql/install.sql` to your database
4. Add `ensure elenaminingjob` to your `server.cfg`
5. Add items to your inventory system
6. Configure `shared/config.lua`
7. Restart your server

#### Configuration

All settings are located in `shared/config.lua`:

* Framework selection (ESX/QB)
* Inventory system
* Mining locations
* Tool prices
* Event timings
* And much more...

***

### 📚 Documentation

| Section         | Description                  |
| --------------- | ---------------------------- |
| Installation    | Step-by-step setup guide     |
| Configuration   | All config options explained |
| Items Setup     | Add items to ox/qb/esx       |
| Events          | World events documentation   |
| Admin Commands  | Admin panel & commands       |
| API Reference   | Exports & functions          |
| Troubleshooting | Common issues & fixes        |

***

### 🆘 Support

* 💬 **Discord:** [Join our server](https://discord.gg/yourlink)
* 🐛 **Bug Reports:** Open a ticket on Discord
* 💡 **Feature Requests:** Open a ticket on Discord
* 📧 **Email:** <support@elenascripts.com>

***

### 📜 License

This script is sold via **Tebex** with **escrow protection**.

* ✅ Use on unlimited servers (with valid license)
* ❌ Resale or redistribution prohibited
* ❌ Decompiling protected files prohibited

***

### 🏆 Why Choose Elena Scripts?

✨ **Production Ready** - Tested on live servers 🛡️ **Anti-Exploit** - Built-in security measures 🌍 **Multi-Language** - English & Turkish included ⚡ **Optimized** - 0.00ms idle performance 📚 **Documented** - Comprehensive guides 🔧 **Configurable** - Every feature customizable 💎 **Premium Quality** - Professional code standards

***

**Made with ❤️ by Elena Scripts**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://elena-scripts.gitbook.io/elenascripts/jobs-and-activities/mining-job.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
