Configuration
This section includes all configurable files for the selected script. Most settings are configured automatically, but each config.lua file contains a header comment explaining the purpose and usage of every configuration type. Be sure to read the header of each file carefully to fully understand how to customize and adapt the system for QBCORE, ESX, or standalone environments, ensuring seamless integration with your server.
qs-lumberjack/config/config.lua
---@generic T
---@param data {[string]: string}
---@return string | false
local function dependencyCheck(data)
for k, v in pairs(data) do
if GetResourceState(k):find('started') ~= nil then
return v
end
end
return false
end
Config = {}
--[[
Framework Detection System:
This script automatically detects if you're using 'es_extended' (ESX), 'qb-core' (QBCore),
or 'qbx_core' frameworks. It configures itself based on the detected framework.
If you've renamed your framework or are using a custom version, do NOT remove the value
from `Config.Framework`. Instead, follow these steps:
1. **Create a new framework file**:
- Add your custom framework logic by creating new files in the following directories:
- `client/custom/framework/`
- `server/custom/framework/`
2. **Modify the detection logic**:
- You can then adapt the framework detection and customization logic within those files
to match your specific framework setup.
Remember: This detection is automatic and should not be edited unless you are certain of the
changes you're making. Incorrect modifications could cause issues with the functionality.
]]
local frameworks = {
['es_extended'] = 'esx',
['qb-core'] = 'qb',
['qbx_core'] = 'qb'
}
Config.Framework = dependencyCheck(frameworks) or 'standalone'
--[[
Inventory System Integration:
This feature allows you to add a personalized stash for each property in the housing asset.
The system is designed to automatically detect which inventory system your server uses.
Supported inventory systems include popular frameworks such as ESX, QBCore, and others.
If your inventory system is not on the supported list, don't worry! You can manually configure
your inventory by editing the files located in:
`client/custom/inventory/*.lua`
If you need further assistance or run into issues, feel free to contact the seller of the asset
for guidance and support.
]]
local inventories = {
['qs-inventory'] = 'qs-inventory',
['qb-inventory'] = 'qb-inventory',
['ps-inventory'] = 'ps-inventory',
['ox_inventory'] = 'ox_inventory',
['core_inventory'] = 'core_inventory',
['codem-inventory'] = 'codem-inventory',
['inventory'] = 'inventory',
['origen_inventory'] = 'origen_inventory',
['tgiann-inventory'] = 'tgiann-inventory',
}
Config.Inventory = dependencyCheck(inventories) or 'default'
--[[
Dispatch System Integration:
This feature allows you to customize how calls and alerts are managed for each supported
dispatch resource within this asset. The system is designed to automatically detect which
dispatch system is currently in use on your server.
Supported dispatch systems include popular frameworks. The detection is done automatically
based on the resource state.
If your dispatch system is not listed or automatically detected, you can manually configure it
by editing the files located in:
`client/custom/dispatch/*.lua`
For any questions or concerns, please contact the seller of the asset for further assistance.
]]
local dispatch = {
['qs-dispatch'] = 'qs-dispatch'
}
Config.Dispatch = dependencyCheck(dispatch) or 'default'
--[[
Phone System Integration:
This feature allows us to manage phone-related functions for the asset's sale board,
ensuring smooth communication and interaction with players. The system is designed
to automatically detect which phone system is currently in use.
Popular phone systems are automatically detected based on your server configuration.
If your phone system is not listed or detected, you can manually configure it by editing
the necessary files located in:
`server/custom/phone/*.lua`
For any questions or support, feel free to contact the seller of this asset for further assistance.
]]
local phones = {
['qs-smartphone-pro'] = 'qs-smartphone-pro',
['qs-smartphone'] = 'qs-smartphone',
['lb-phone'] = 'lb-phone',
['gksphone'] = 'gksphone',
['okokPhone'] = 'okokPhone',
['roadphone'] = 'roadphone',
['codem-phone'] = 'codem-phone'
}
Config.Phone = dependencyCheck(phones) or 'default'
--[[
Wardrobe System Integration:
This function is responsible for the automated configuration of the wardrobe system,
detecting which wardrobe system is currently in use on your server and setting it
automatically for this asset.
If your wardrobe system is not detected or listed here, you can manually configure it
by editing the relevant files located in:
`client/custom/wardrobe/*.lua`
If you have any questions or need assistance, please contact the seller of your asset for support.
]]
local wardrobes = {
['qs-appearance'] = 'qs-appearance',
['qb-clothing'] = 'qb-clothing',
['codem-appearance'] = 'codem-appearance',
['ak47_clothing'] = 'ak47_clothing',
['fivem-appearance'] = 'fivem-appearance',
['illenium-appearance'] = 'illenium-appearance',
['raid_clothes'] = 'raid_clothes',
['rcore_clothes'] = 'rcore_clothes',
['rcore_clothing'] = 'rcore_clothing',
['sleek-clothestore'] = 'sleek-clothestore',
['tgiann-clothing'] = 'tgiann-clothing',
['p_appearance'] = 'p_appearance'
}
Config.Wardrobe = dependencyCheck(wardrobes) or 'default'
--[[
Garage System Configuration:
This function handles the automatic configuration of the garage system on the server.
If your server does not use a compatible garage system, or if you haven't created
a compatible custom garage system in the server files, the option to use garages
will automatically be disabled.
To enable garages, you can create or configure a compatible system by editing the files located in:
`server/custom/garage/*.lua`
If you have any questions or need help configuring your garage system, contact the seller
of your asset for further assistance.
]]
local garages = {
['qb-garages'] = 'qb-garages',
['qs-advancedgarages'] = 'qs-advancedgarages',
['jg-advancedgarages'] = 'jg-advancedgarages',
['cd_garage'] = 'cd_garage',
['okokGarage'] = 'okokGarage',
['loaf_garage'] = 'loaf_garage',
['rcore_garage'] = 'rcore_garage',
['zerio-garage'] = 'zerio-garage',
['codem-garage'] = 'codem-garage',
['ak47_garage'] = 'ak47_garage',
['ak47_qb_garage'] = 'ak47_qb_garage',
['vms_garagesv2'] = 'vms_garagesv2',
['cs-garages'] = 'cs-garages',
['msk_garage'] = 'msk_garage',
['RxGarages'] = 'RxGarages'
}
Config.Garage = dependencyCheck(garages) or 'standalone'
Config.RequireJob = false -- true if you want it to require a job, false to not require any job
Config.LumberJackJob = { -- List of jobs that can interact with the mining job. Set to true to enable interaction. Multiple jobs can be included, but they must be set to true to function.
['lumberjack'] = true,
--['jobname'] = true,
}
Config.Target = false -- if you want to use target script or press a key when nearby
Config.TargetScript = "ox" -- "ox" or "qb"
Config.DefaultNotifications = true -- false if you have a custom notify system
Config.EnableMarker = true -- Set to true to display a 3D marker at interaction locations to guide the player
Config.MarkerColor = "red" -- At the moment only "green" and "red" are available
Config.RespawnTime = 15000 -- Time in ms for tree respawn
Config.TreeBlips = true -- false if you don't want to see blips for the trees, you can only see them if you are on duty
Config.InventoryAxe = false -- True if your inventory can handle durability for the axe
Config.InventoryAxeScript = "ox" -- Only "ox" at the moment
Config.Clothing = false -- True if you use clothing system
Config.DropProtectionTime = 10000 -- Time to protect the drop from other players in ms
Config.AxeDepositProp = true -- False if it's to heavy for your server and we use an ingame one. Check in props.lua
Config.Keys = {
InteractKey = "E", -- "E"
OpenStatsMenu = "n" -- Key to open stats menu
}
Config.Locations = {
lumberjackZoneBlip = {
public = true, -- Set to true if you want all players to be able to see the blip
coords = { x = -561.30, y = 5354.94, z = 70.88 },
details = { name = 'Lumberjack Zone', sprite = 285, size = 1.0, color = 21, display = 2 }
},
pedManager = {
model = "s_m_m_dockwork_01",
pos = vec4(-561.309875, 5354.953613, 70.208008, 70.866142),
},
pedQuest = {
model = "s_m_m_dockwork_01",
pos = vec4(-574.272522, 5354.123047, 70.208008, 252.0),
details = { name = 'Lumberjacks quest', sprite = 306, size = 1.3, color = 10, display = 2 },
coords = { x = -574.27, y = 5354.123, z = 70.20 },
},
pedLeaderBoard = {
model = "s_m_m_dockwork_01",
pos = vec4(-567.059326, 5337.982422, 70.208008, 70.8),
details = { name = 'Lumberjack leaderboard', sprite = 439, size = 1.0, color = 10, display = 2 },
coords = { x = -567.059326, y = 5337.982422, z = 70.20 },
},
pedSeller = {
model = "s_m_m_dockwork_01",
pos = vec4(-577.437378, 5342.518555, 70.208008, 255),
details = { name = 'Sell materials', sprite = 431, size = 1.0, color = 10, display = 2 },
coords = { x = -577.437378, y = 5342.518555, z = 70.208008 }
},
boxMarker = {
coords = vec3(-559.806580, 5362.232910, 71.224854)
},
treeBlip = {
public = false,
details = { name = 'Tree', sprite = 285, size = 0.5, color = 21, display = 2 },
coords = {}
}
}
Config.LevelExperience = {
LevelBonusMultiplier = 0.5, -- Percentage increase in item drop rate per player level (e.g., 0.5% more chance per level)
BaseExperience = 3500, -- Base experience required for level 1
GrowthFactor = 1.1, -- How much the experience required increases with each level, allowing for infinite leveling
}
Config.AxeAttachment = {
bone = 57005,
pos = { x = 0.1, y = 0.5, z = 0.4 },
rot = { x = 12.0, y = 769.0, z = 5147.0 },
useSoftPinning = false,
collision = true,
isPed = false,
vertexIndex = true,
fixedRot = 0,
autoDetach = true
}
Config.AxeWithdrawAnimation = false -- false if you don't want to show an animation when the player put the axe in the hand
Config.Trees = {
[1] = {
levelRequired = 1,
chances = { tree1 = 100 }, -- Chance for materials to spawn, The sum of all chances must be exactly 100 for the system to function correctly.
coords = {
vec3(-512.241760, 5470.377930, 76.038086),
vec3(-505.753845, 5475.837402, 77.958984),
vec3(-498.013184, 5475.191406, 80.739258),
vec3(-497.868134, 5467.424316, 81.008789),
vec3(-501.797791, 5459.248535, 79.509155),
vec3(-482.030762, 5464.615234, 84.378784),
vec3(-471.613190, 5483.301270, 84.631470),
vec3(-482.993408, 5488.153809, 82.828613),
vec3(-487.621979, 5481.652832, 83.098145),
vec3(-492.276917, 5474.057129, 82.592651),
vec3(-497.604401, 5463.085938, 80.991943),
vec3(-504.461548, 5461.002441, 78.767822),
vec3(-507.507690, 5471.301270, 77.655640),
vec3(-514.312073, 5482.839355, 73.746582),
vec3(-523.054932, 5483.195801, 70.359741),
vec3(-531.151672, 5477.274902, 68.792725),
vec3(-537.652771, 5470.404297, 68.017578),
vec3(-542.334045, 5461.793457, 67.916504),
vec3(-483.771423, 5454.474609, 83.013916),
vec3(-517.028564, 5454.197754, 74.942871),
vec3(-527.010986, 5459.920898, 71.994141)
}
},
[2] = {
levelRequired = 3, -- Minimum level required to collect materials at this tier
chances = { tree2 = 100 }, -- Chance for materials to spawn, The sum of all chances must be exactly 100 for the system to function correctly.
coords = {
vec3(-669.876892, 5333.393555, 64.833008),
vec3(-678.145081, 5329.213379, 67.175049),
vec3(-689.854919, 5329.938477, 69.230713),
vec3(-685.846130, 5345.789062, 67.832275),
vec3(-684.250549, 5357.143066, 65.928223),
vec3(-686.676941, 5370.883301, 61.968506),
vec3(-689.327454, 5382.052734, 57.941406),
vec3(-709.239563, 5379.745117, 59.104004),
vec3(-716.663757, 5389.213379, 55.734009),
vec3(-728.729675, 5377.978027, 57.671753),
vec3(-735.692322, 5365.028809, 59.997070),
vec3(-732.356018, 5351.380371, 62.709839),
vec3(-714.712097, 5337.982422, 69.230713),
vec3(-714.210999, 5353.516602, 65.355347)
}
},
[3] = {
levelRequired = 10, -- Minimum level required to collect materials at this tier
chances = { tree3 = 100 }, -- Chance for materials to spawn, The sum of all chances must be exactly 100 for the system to function correctly.
coords = {
vec3(-485.736267, 5669.406738, 59.002930),
vec3(-476.281311, 5668.404297, 61.159668),
vec3(-464.610992, 5667.547363, 66.905518),
vec3(-458.136261, 5675.433105, 70.528198),
vec3(-457.542847, 5694.210938, 71.387573),
vec3(-468.448364, 5695.384766, 66.972900),
vec3(-477.837372, 5696.993164, 63.956787),
vec3(-487.305481, 5698.246094, 60.131836),
vec3(-490.562622, 5708.689941, 62.625610),
vec3(-478.114288, 5714.689941, 65.422729),
vec3(-467.881317, 5716.641602, 69.163330),
vec3(-480.356049, 5680.087891, 61.429321)
}
},
}
Config.WoodTypes = {
["tree1"] = {
model = "prop_dynasty_pine",
drop = {
prop = "prop_dynasty_wood_drop_1",
items = {
{ "pine_wood", "Pine wood", 100, 1, 5 }, --- item name, item ingame label, probability, max drop, sell price
{ "pine_resin", "Pine resin", 20, 3, 7 }, --- item name, item ingame label, probability, max drop, sell price
{ "wood_shavings", "Wood Shavings ", 10, 2, 9 } --- item name, item ingame label, probability, max drop, sell price
},
},
experience = 25, -- Experience gained for collecting this material
health = 100, -- Number of hits required with the axe to collect this material
durabilitypenalty = 1, -- How much durability is reduced on the axe per hit
},
["tree2"] = {
model = "prop_dynasty_oak",
drop = {
prop = "prop_dynasty_wood_drop_1",
items = {
{ "oak_wood", "Oak wood", 100, 1, 5 }, --- item name, item ingame label, probability, max drop, sell price
{ "oak_bark", "Oak Bark", 20, 3, 7 }, --- item name, item ingame label, probability, max drop, sell price
{ "arcorn", "Arcorn", 10, 2, 9 } --- item name, item ingame label, probability, max drop, sell price
},
},
experience = 50, -- Experience gained for collecting this tree material
health = 200, -- Number of hits required with the axe to collect this tree material
durabilitypenalty = 1, -- How much durability is reduced on the axe per hit
},
["tree3"] = {
model = "prop_dynasty_birch",
drop = {
prop = "prop_dynasty_wood_drop_1",
items = {
{ "maple_wood", "Maple wood", 100, 1, 5 }, --- item name, item ingame label, probability, max drop, sell price
{ "strong_fiber", "Strong fiber", 20, 3, 7 }, --- item name, item ingame label, probability, max drop, sell price
{ "maple_syrup_extract", "Maple syrup extract", 10, 2, 9 }, --- item name, item ingame label, probability, max drop, sell price
},
},
experience = 75, -- Experience gained for collecting this tree material
health = 300, -- Number of hits required with the axe to collect this tree material
durabilitypenalty = 1, -- How much durability is reduced on the axe per hit
}
}
Config.AxeLevel = {
["axe_rusty"] = {
prop = "prop_dynasty_axe_lvl_1",
label = 'Rusty Axe',
durability = 100, -- The lifespan of the axe, i.e., the number of times you can use it before it breaks
price = 50, -- The cost to purchase the axe
levelRequired = 1, -- Minimum level required to purchase this axe
itemAcquisitionBonus = 0, -- Extra percentage chance to acquire items when using this axe
damage = 25 -- Axe damage to trees
},
["axe_iron"] = {
prop = "prop_dynasty_axe_lvl_2",
label = 'Iron-Edged Axe',
durability = 300, -- The lifespan of the axe, i.e., the number of times you can use it before it breaks
price = 300, -- The cost to purchase the axe
levelRequired = 3, -- Minimum level required to purchase this axe
itemAcquisitionBonus = 10, -- Extra percentage chance to acquire items when using this axe
damage = 35, -- Axe damage to trees
},
["axe_mythical"] = {
prop = "prop_dynasty_axe_lvl_3",
label = 'Mythical Axe',
durability = 1200, -- The lifespan of the axe, i.e., the number of times you can use it before it breaks
price = 2000, -- The cost to purchase the axe
levelRequired = 6, -- Minimum level required to purchase this axe
itemAcquisitionBonus = 25, -- Extra percentage chance to acquire items when using this axe
damage = 50 -- Axe damage to trees
}
}
Config.Quests = {
["Daily quest"] = { -- This quest can only be done ONCE PER DAY
amount = { 300 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 1, -- Minimum level required to undertake this quest
payment = 500, -- Payment received upon completing the quest
experience = 100, -- Experience gained upon completing the quest
materialsRequired = { "pine_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
isDaily = true -- States if this quest can only be done once per day
},
["Beginner's Bounty"] = {
amount = { 100 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 1, -- Minimum level required to undertake this quest
payment = 130, -- Payment received upon completing the quest
experience = 100, -- Experience gained upon completing the quest
materialsRequired = { "pine_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
isDaily = false
},
["Novice's Quest"] = {
amount = { 200 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 2, -- Minimum level required to undertake this quest
payment = 200, -- Payment received upon completing the quest
experience = 2500, -- Experience gained upon completing the quest
materialsRequired = { "oak_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
isDaily = false
},
["Apprentice's Challenge"] = {
amount = { 300, 200 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 2, -- Minimum level required to undertake this quest
payment = 340, -- Payment received upon completing the quest
experience = 300, -- Experience gained upon completing the quest
materialsRequired = { "pine_wood", "oak_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
isDaily = false
},
["Journeyman's Task"] = {
amount = { 500, 300 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 2, -- Minimum level required to undertake this quest
payment = 490, -- Payment received upon completing the quest
experience = 400, -- Experience gained upon completing the quest
materialsRequired = { "oak_wood", "maple_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
isDaily = false
},
["Master's Trial"] = {
amount = { 400 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 4, -- Minimum level required to undertake this quest
payment = 700, -- Payment received upon completing the quest
experience = 500, -- Experience gained upon completing the quest
materialsRequired = { "maple_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
isDaily = false
},
["Grandmaster's Quest"] = {
amount = { 600, 400, 300 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 5, -- Minimum level required to undertake this quest
payment = 1500, -- Payment received upon completing the quest
experience = 600, -- Experience gained upon completing the quest
materialsRequired = { "pine_wood", "oak_wood", "maple_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
isDaily = false
}
}
Config.GroupQuests = {
["Beginner's Expedition"] = {
amount = { 30, 60 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 1, -- Minimum level required to undertake this quest
payment = 400, -- Payment received upon completing the quest
experience = 300, -- Experience gained upon completing the quest
materialsRequired = { "pine_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
recommendedPlayers = 1 -- Recommended number of players for this quest
},
["Novice's Expedition"] = {
amount = { 200 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 3, -- Minimum level required to undertake this quest
payment = 600, -- Payment received upon completing the quest
experience = 500, -- Experience gained upon completing the quest
materialsRequired = { "oak_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
recommendedPlayers = 3 -- Recommended number of players for this quest
},
["Apprentice's Expedition"] = {
amount = { 500, 400 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 6, -- Minimum level required to undertake this quest
payment = 1000, -- Payment received upon completing the quest
experience = 800, -- Experience gained upon completing the quest
materialsRequired = { "pine_wood", "oak_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
recommendedPlayers = 4 -- Recommended number of players for this quest
},
["Journeyman's Expedition"] = {
amount = { 1000 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 4, -- Minimum level required to undertake this quest
payment = 1500, -- Payment received upon completing the quest
experience = 1200, -- Experience gained upon completing the quest
materialsRequired = { "maple_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
recommendedPlayers = 10 -- Recommended number of players for this quest
},
["Master's Expedition"] = {
amount = { 2000, 1500, 1000 }, -- Quantity required for each material in the same order as listed in materialsRequired
requiredLevel = 25, -- Minimum level required to undertake this quest
payment = 2500, -- Payment received upon completing the quest
experience = 2000, -- Experience gained upon completing the quest
materialsRequired = { "pine_wood", "oak_wood", "maple_wood" }, -- Materials required for the quest, quantity defined in amount in the same order
recommendedPlayers = 20 -- Recommended number of players for this quest
}
}
Config.UpdateLeaderboard = 1 -- Minutes between next leaderboard update
Config.LeaderBoardRewards = { -- Leaderboard rewards
Daily = { -- Resets at 00:00 server hour
[1] = 5215, --1st Place
[2] = 350, --2nd Place
[3] = 200 --3rd Place
},
Season = { -- Resets at 00:00 server hour the first day of every month
[1] = 5000,
[2] = 3500,
[3] = 2000
}
}
Config.Drawtext = false
--Customize your notification system here.
function SendTextMessage(msg, type)
if type == 'info' then
-- VANILLA NOTIFY
-- SetNotificationTextEntry('STRING')
-- AddTextComponentString(msg)
-- DrawNotification(0, 1)
-- CUSTOM NOTIFY
-- exports["Notify"]:Alert(msg, type)
end
if type == 'error' then
-- VANILLA NOTIFY
-- SetNotificationTextEntry('STRING')
-- AddTextComponentString(msg)
-- DrawNotification(0, 1)
-- CUSTOM NOTIFY
-- exports["Notify"]:Alert(msg, type)
end
if type == 'success' then
-- VANILLA NOTIFY
-- SetNotificationTextEntry('STRING')
-- AddTextComponentString(msg)
-- DrawNotification(0, 1)
-- CUSTOM NOTIFY
-- exports["Notify"]:Alert(msg, type)
end
end