QBESXStandalone
Agency-Minerjob V2 Exports & API
A mining job for FiveM on QBCore, Qbox, ESX or fully standalone, in three places: the Davis Quartz quarry, the old mine.
v2.0.0Paid5 Pages

01Client Exports
| Export | Description |
|---|---|
OpenMenu(page) | Opens the menu, for example from a radial menu or a phone app. page is overview (default), market, tools, smelter, cutting or contracts. |
CloseMenu() | Closes the menu and gives the mouse back to the game. |
IsMenuOpen() | True while the menu is open. |
IsWorking() | True while the player is mining or cutting a gem. |
GetLevel() | The mining level of the player. |
02Server Exports
| Export | Description |
|---|---|
GetLevel(source) | The mining level of a player, 0 when the player is unknown. |
GetProgress(source) | Level and progress as { level, xp, need, pct, max }. |
AddXp(source, amount) | Adds XP, with level ups and their message. Returns true when the player was found. |
SetLevel(source, level) | Sets the level between 1 and the highest level and starts it at 0 XP. |
GetStats(source) | What the player did so far: { mined, smelted, cut, broken, sold, earned, contracts }. |
GetPrice(item) | The current market price of an item per piece. |
03Events
| Name | Side | Description |
|---|---|---|
agency-minerjob:mined | Server | Fired on the server after a mining paid out, with source, item, count and the mining area. Listen with AddEventHandler, for example for quests or statistics. |
agency-minerjob:sold | Server | Fired on the server after a sale, with source, item, count and the total paid. |
agency-minerjob:contract | Server | Fired on the server when a contract was delivered, with source, item, count and the pay. |
+Good to know
Agency-Minerjob V2 offers exports and server events, so quests, achievements, phones and admin tools can read levels and prices, hand out XP and react to mining, sales and contracts.
- Levels and XP
- GetLevel, GetProgress, AddXp and SetLevel read and change the level of a player on the server. AddXp shows the level up message like a mining does.
- Stats and Prices
- GetStats returns what a player mined, smelted, cut, broke, sold, earned and delivered. GetPrice reads the current market price of any item.
- Server Events
- agency-minerjob:mined, agency-minerjob:sold and agency-minerjob:contract are fired on the server after the reward was paid. Listen with AddEventHandler; they only report, the payout already happened.
?Frequently asked questions
How do I open the menu from my radial menu?
Call exports['Agency-Minerjob']:OpenMenu() on the client, or pass a page such as 'market' or 'contracts' to open that page directly.