Miner Job
Config file
config.luaESXEvent = nil -- set to nil to use export or event name
Language = "en"
Config = {}
Config.Clothes = {}
Config.WeaponName = "WEAPON_PICKAXE"
Config.SellPed = { coords = vec4(2340.691895, 3126.286133, 47.208706, 358.325165), model = `s_m_y_construct_02` }
Config.Job = {
name = "miner",
startPed = {
coords = vector4(2948.319580, 2750.258301, 42.364620, 191.618118),
model = `s_m_y_construct_01`
},
label = _L("job_label"),
maxPlayers = 6,
description = _L("job_description"),
changePercent = true, -- allows owner to change player percents
requireClothes = true, -- require job colthes
clothes = Config.Clothes,
requireJob = false,
canEndFaster = false,
vehicle = { -- or nil
price = 500,
model = `madler`,
coords = vector4(2952.506592, 2748.460205, 43.520721, 278.633026),
props = {
livery = 1,
}
},
-- changes difficulty (amount of stones) depending on players on job
difficulty = {
[1] = 18,
[2] = 36,
[3] = 54,
[4] = 72,
[5] = 90,
[6] = 108,
},
-- when players are not close to a owner/action coords during a action it kicks them
playersActivityCheck = {
closeCheck = true,
vehDist = 250.0, -- distance from the vehicle
noActionCheck = true, -- kicks a player when no action was performed during amount of other player actions
noActionTimes = 18, -- amount of difference required between most active player and checked player (stones mined in this case)
offlineTime = 5 * 60, -- kick player after amount of time offline
},
minigameCount = 18, -- stone count minigame can smelt at once
payout = {
-- bonus system (there's a base payout and for each additional player bonus percentage)
useBonusPercent = false, -- uses basePayout and bonusPercent per player
basePayout = 500,
bonusPercent = 0.25,
-- custom (TOTAL AMOUNT)
playerPayouts = {
[1] = 300,
[2] = 600,
[3] = 900,
[4] = 1200,
[5] = 1500,
[6] = 1800
},
},
legacyMode = false, -- uses legacy mode (item based)
mustSell = true, -- players must sell all of the ores to continue working (legacy option)
blips = {
{
hasJob = true, -- requires job (or display always when requireJob is set to false)
activeJob = false, -- requires being in active job (in party)
label = _L("start_blip"),
coords = vector3(2948.319580, 2750.258301, 42.364620),
sprite = 366,
color = 28,
scale = 1.0,
},
{
hasJob = true, -- requires job (or display always when requireJob is set to false)
activeJob = true, -- requires being in active job (in party)
label = _L("mine_blip"),
coords = vector3(2949.540039, 2789.808350, 43.991825),
sprite = 164,
color = 28,
scale = 1.0,
},
{
hasJob = true, -- requires job (or display always when requireJob is set to false)
activeJob = true, -- requires being in active job (in party)
label = _L("mine_blip"),
coords = vector3(2949.540039, 2789.808350, 43.991825),
radius = 40.0,
alpha = 100,
color = 33
},
{
hasJob = true, -- requires job (or display always when requireJob is set to false)
activeJob = true, -- requires being in active job (in party)
label = _L("smelt_blip"),
coords = vector3(1119.2, -2014.75, 35.53),
sprite = 618,
color = 28,
scale = 1.0,
},
{
hasJob = true, -- requires job (or display always when requireJob is set to false)
activeJob = true, -- requires being in active job (in party)
label = _L("sell_blip"),
coords = vector3(2340.691895, 3126.286133, 47.208706),
sprite = 272,
color = 28,
scale = 1.0,
},
},
}
Config.StandaloneControls = {
["smelt"] = {
key = 38, -- its E on keyboard, to change to diffrent key see https://docs.fivem.net/docs/game-references/controls/
disabled = false
},
["sell"] = {
key = 38, -- its E on keyboard, to change to diffrent key see https://docs.fivem.net/docs/game-references/controls/
disabled = false
},
}
Config.SmeltTarget = {
coords = vector4(1119.2, -2014.75, 35.53, 325),
length = 2.0,
width = 1.0,
minZ = 34.53,
maxZ = 36.33,
}
Config.MaxRocks = 35 -- amount of rocks spawned at the quarry at one moment
Config.Quarry = {
coords = vector3(2944.868164, 2793.135254, 40.529549),
minDist = 120.0 -- spawn distance of rocks
}
Config.Borders = {
x = {
min = 2931,
max = 2967
},
y = {
min = 2763,
max = 2813
}
}
Config.MoneyItem = "money" -- set to bank/money/itemName
Config.DisableMinigame = false
Config.JobName = "miner"
-- none/error/warning/all
Config.Verbose = "warning"
Config.AfkTime = 60 * 60
Config.MinigameOptions = {
["default"] = {
loadTime = 3000,
time = 20000,
moveInterval = 2000,
moveSpeed = 300,
targetWidth = 0.15,
},
-- Here you can setup custom minigame options for each ore (LEGACY)
["diamond_ore"] = {
loadTime = 3000,
time = 20000,
moveInterval = 2000,
moveSpeed = 300,
targetWidth = 0.15,
},
["gold_ore"] = {
loadTime = 3000,
time = 20000,
moveInterval = 2000,
moveSpeed = 300,
targetWidth = 0.15,
},
["silver_ore"] = {
loadTime = 3000,
time = 20000,
moveInterval = 2000,
moveSpeed = 300,
targetWidth = 0.15,
},
["iron_ore"] = {
loadTime = 3000,
time = 20000,
moveInterval = 2000,
moveSpeed = 300,
targetWidth = 0.15,
},
["coal_ore"] = {
loadTime = 3000,
time = 20000,
moveInterval = 2000,
moveSpeed = 300,
targetWidth = 0.15,
},
}
-- LEGACY CONFIG
Config.MinigamePerType = false
Config.TakeTypeAfterFail = false
Config.OreItems = {
["diamond_ore"] = "diamond",
["gold_ore"] = "gold",
["silver_ore"] = "silver",
["iron_ore"] = "iron",
["coal_ore"] = "coal"
}
-- combined value must be equal to 100
Config.Chances = {
["diamond_ore"] = 4,
["gold_ore"] = 10,
["silver_ore"] = 20,
["iron_ore"] = 28,
["coal_ore"] = 38
}
Config.Prices = {
["diamond"] = 125,
["gold"] = 95,
["silver"] = 62,
["iron"] = 50,
["coal"] = 43
}
Common Issues
I can't equip my pickaxe
Ensure that you have downloaded the necessary files for the pickaxe weapon. The pickaxe weapon is available on the ScriptForge GitHub repository. You can access it here. Make sure you have downloaded it and started in server.cfg.
Legacy mode
What is legacy mode?
Prior to the update, players received ores as items. In the interest of making it easier to balance economy, we have transitioned to a system of fixed payouts. However, if you prefer to continue relying on the previous method of items and drop chances, you can enable the legacyMode by setting it to true. This will replicate the original functionality while still being compatible with the multiplayer system.