Agency Docs
QBESX

Agency-Minerjob Configuration

Enhanced mining job for FiveM with multi-framework and multi-inventory auto-detection.

v1.2.0Paid4 Pages

01Configuration

Quick Installation · config.lua · Agency-Minerjob

Download config.lua

Config = Config or {} -- Framework Configuration Config.Framework = 'auto' -- Choose between 'qb-core', 'esx', or 'auto' for automatic detection -- 'auto' = Automatic detection (recommended) -- 'qb-core' = Force QB-Core -- 'esx' = Force ESX -- Inventory System Configuration Config.InventorySystem = 'auto' -- Choose between 'ox', 'esx', 'qb', or 'auto' -- 'auto' = Automatic detection based on available resources (recommended) -- 'ox' = ox_inventory (works with both QB-Core and ESX) -- 'esx' = ESX default inventory -- 'qb' = QB-Core default inventory -- Auto-Detection Function (do not edit unless you know what you're doing) function Config.DetectFramework() if GetResourceState('qb-core') == 'started' then return 'qb-core' elseif GetResourceState('es_extended') == 'started' then return 'esx' else print('[Agency-Minerjob] WARNING: No supported framework detected! Please configure manually.') return 'qb-core' -- Default fallback end end function Config.DetectInventory() if GetResourceState('ox_inventory') == 'started' then return 'ox' elseif GetResourceState('qb-core') == 'started' then return 'qb' elseif GetResourceState('es_extended') == 'started' then return 'esx' else print('[Agency-Minerjob] WARNING: No supported inventory system detected! Using QB-Core default.') return 'qb' -- Default fallback end end -- Notification System Configuration Config.UseAgencyNotify = true -- Use Agency-Notify system (recommended for better notifications) -- Localization Configuration Config.Locale = 'de' -- Default language -- Available languages: -- 'en' = English 'de' = Deutsch 'fr' = Français -- 'es' = Español 'pt' = Português 'it' = Italiano -- 'nl' = Nederlands 'pl' = Polski 'cs' = Čeština -- 'ro' = Română 'tr' = Türkçe 'ru' = Русский -- 'uk' = Українська 'sv' = Svenska 'da' = Dansk -- 'no' = Norsk 'fi' = Suomi 'hu' = Magyar -- 'hr' = Hrvatski 'el' = Ελληνικά 'bg' = Български -- 'ja' = 日本語 'ko' = 한국어 'zh' = 中文 -- Mining Configuration Config.GiveItemProbability = 100 -- Probability to get an item (0-100%) - Always give items Config.MinItems = 1 -- Minimum items to give Config.MaxItems = 2 -- Maximum items to give -- Drop chance configuration (per item type) - Base chances at level 1 Config.DropChances = { stone = 100, -- 100% chance to get stone coal = 70, -- 85% chance to get coal silver = 50, -- 70% chance to get silver copper = 30, -- 50% chance to get copper diamond = 5, -- 25% chance to get diamond emerald = 10 -- 1% chance to get emerald } -- Mining Skill System Config.SkillSystem = { enabled = true, maxLevel = 100, xpPerMining = 8, -- Base XP per successful mining (reduced) xpBonusPerLevel = 1.5, -- Additional XP per level (slower bonus growth) -- XP required for each level (steeper exponential growth for longer progression) xpFormula = function(level) return math.floor(120 * (level ^ 1.8)) end, -- Balanced probability system - always totals exactly 100% -- Base chances at level 1 (must total 100%) baseDropChances = { stone = 60.0, -- Most common coal = 25.0, -- Common silver = 10.0, -- Uncommon copper = 4.0, -- Rare diamond = 0.8, -- Very rare emerald = 0.2 -- Legendary (0.2% at start) }, -- How much each item's chance changes per level -- Positive = increases, Negative = decreases chanceChangePerLevel = { stone = -0.4, -- Decreases by 0.4% per level coal = -0.2, -- Decreases by 0.2% per level silver = -0.1, -- Decreases by 0.1% per level copper = 0.2, -- Increases by 0.2% per level diamond = 0.3, -- Increases by 0.3% per level emerald = 0.2 -- Increases by 0.2% per level }, -- Minimum and maximum bounds for each item chanceBounds = { stone = {min = 20.0, max = 60.0}, -- Always common, but not overwhelming coal = {min = 10.0, max = 35.0}, -- Stays reasonably common silver = {min = 8.0, max = 25.0}, -- Moderate range copper = {min = 4.0, max = 20.0}, -- Can become quite common at high levels diamond = {min = 0.8, max = 15.0}, -- Significant growth potential emerald = {min = 0.2, max = 10.0} -- Rare but can become decent chance } } -- Item configuration (weights are ignored - only drop chances from SkillSystem are used) Config.Items = { {item = 'stone', min = 1, max = 3}, {item = 'coal', min = 1, max = 2}, {item = 'silver', min = 1, max = 2}, {item = 'copper', min = 1, max = 1}, {item = 'diamond', min = 1, max = 1}, {item = 'emerald', min = 1, max = 1} } -- Price ranges for each item (min to max) Config.PriceRanges = { stone = {min = 250, max = 500}, coal = {min = 500, max = 1000}, silver = {min = 1000, max = 2000}, copper = {min = 2000, max = 3000}, diamond = {min = 3000, max = 5000}, emerald = {min = 8000, max = 10000} } -- Dynamic pricing configuration Config.DynamicPricing = { enabled = true, updateIntervalMinutes = 10, -- How often prices update (in minutes) priceFluctuationPercent = 20 -- How much prices can change per update (percentage) } Config.DrawMarkers = { Distance = 10.0, Type = 2, Size = {x = 1.0, y = 1.0, z = 0.5}, Color = {r = 255, g = 255, b = 255}, -- White color } Config.CoolDoownForEachRock = 20 -- Cooldown so you can't mine the same stone, you need to wait this seconds Config.RockBlips = { sprite = 443, scale = 0.6, colour = 64, } Config.RockSkillCheck = { difficulty = 'easy', -- easy, medium, hard repeatTimes = 3, -- Always 3 skill checks for one reward } Config.MiningZones = { DavisQuartz = { ped = { model = 'a_m_m_bevhills_01', coords = vec4(2956.95, 2744.58, 43.56, 286.29), spriteBlip = 207, -- Changed to buyer icon scaleBlip = 1.2, colourBlip = 66, -- Changed to buyer color (green) }, rocksPositions = { vec3(2951.82, 2769.76, 39.03), vec3(2969.16, 2777, 38.43), vec3(2973.73, 2775.26, 38.20), vec3(2939.3174, 2772.4861, 39.2743), vec3(2929.4849, 2788.7048, 39.9077), vec3(2926.4578, 2794.9302, 40.7668), vec3(2938.4460, 2811.3911, 42.5717), vec3(2944.6978, 2817.5015, 42.7257), vec3(2947.3318, 2819.3782, 42.6823), vec3(2954.8787, 2819.8843, 42.5190), vec3(2991.0737, 2777.8633, 43.2770), vec3(2998.4082, 2759.3228, 42.9451), vec3(2983.3010, 2761.8564, 42.7899), vec3(2953.4241, 2756.1313, 43.5224), vec3(2943.8330, 2742.7700, 43.3738), vec3(2929.8323, 2761.1487, 44.7036) } } } -- Removed SellZones - now the miner NPC is also the buyer

02SQL File

Import this SQL file into your database before starting the resource:

-- Mining Skills System Database Table -- Execute this SQL query in your database to create the mining skills table CREATE TABLE IF NOT EXISTS `player_mining_skills` ( `id` int(11) NOT NULL AUTO_INCREMENT, `citizenid` varchar(50) NOT NULL, `level` int(11) NOT NULL DEFAULT 1, `xp` int(11) NOT NULL DEFAULT 0, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `citizenid` (`citizenid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Still stuck after this page? Our support team takes it from here.