> For the complete documentation index, see [llms.txt](https://f4-studio.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://f4-studio.gitbook.io/documentation/resources/f4-miningjob.md).

# f4-miningjob

A mining job for FiveM with a mine you dig yourself: a cage down the shaft, four levels, pickaxes and drills, ore, upgrades and crews.

A mining job for FiveM with a real mine. Players ride a cage down the shaft, pick up a pickaxe or a rock drill and dig their own tunnels through the rock — sideways, upwards, wherever they like. Ore falls to the floor, goes into a mine-only ore satchel and is sold at the depot scale. Levels unlock better tools, deeper cage stops and richer rock.

![A miner digging a tunnel with a pickaxe](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FVgXlEC1bfXtN2P4L3VBZ%2Ff4-mining-dig.jpg?alt=media)

It runs on QBCore, Qbox and ESX, and standalone. ox\_inventory, qb-inventory, ps-inventory, lj-inventory and the ESX inventory are built in.

## What it is for

* **A legal job people spend an evening on.** Something to get better at, a place to go with friends, and money that is earned rather than handed out.
* **A place, not a prop.** The mine is a shaft with four levels and a hub at every stop. The tunnels players dig stay where they left them.

## What is in it

| Area            | What it covers                                                                                                                                                                           |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **The mine**    | A shaft with four cage stops, from the Upper Seams at 40 m down to The Abyss at 175 m, each with its hub, its lamps, a cage, the equipment bench and the depot scale. 514 custom models. |
| **Mines**       | A public mine for the whole server, a private claim for every player, and fresh mines for crews of up to four.                                                                           |
| **Digging**     | Rock that breaks where you hit it, in stages. Weak points for critical hits, ore that drops to the floor, rubble, and floors that never break.                                           |
| **Tools**       | Pickaxe, heavy pickaxe, rock drill and blasting charges, with wear, repairs and upgrades.                                                                                                |
| **Ore**         | Six ores with their own depths, crystal geodes, and the Ore Book that shows where each one is found.                                                                                     |
| **Ore satchel** | A mine-only bag, 40 to 320 pieces of ore. It never changes the size of the player's own inventory.                                                                                       |
| **Progression** | 40 levels that unlock tools, cage stops and a deeper dig permit, and make every swing a little stronger.                                                                                 |
| **Atmosphere**  | Dark at any time of day: headlamps, work lamps, dust and dripping water.                                                                                                                 |

## How the mine reaches players

The **server owns the mine**. It keeps the list of dug cells, checks every hit for reach, tool and rate, rolls every drop and pays every sale. Clients only draw what the server decided.

The rock itself is **never networked**. Each client builds the rock around itself from the mine's seed and the list of dug cells, and follows the server's numbered updates. Late joiners get a compact snapshot. A crowded mine costs each client about what an empty one does.

{% hint style="info" %}
The cage is a real ride. The level loads around the stop while the cage travels down the shaft, and the cage only lands once the floor, the hub and the rock around the player are really there.
{% endhint %}

## Where to start

* [Requirements](/documentation/resources/f4-miningjob/getting-started/requirements.md) — what the server needs.
* [Installation](/documentation/resources/f4-miningjob/getting-started/installation.md) — the folder, the items and the entrance.
* [First Run](/documentation/resources/f4-miningjob/getting-started/first-run.md) — from the entrance to your first sale in ten minutes.
* [Main Configuration](/documentation/resources/f4-miningjob/configuration/main-configuration.md) — framework, inventory, keys and item names.
* [Open Hooks](/documentation/resources/f4-miningjob/developers/open-hooks.md) — job requirements, logs and your own economy.
