> For the complete documentation index, see [llms.txt](https://mscripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mscripts.gitbook.io/docs/qbcore/jobs/qb-lumberjack/config.md).

# Config

{% tabs %}
{% tab title="config.lua" %}

```lua
Config = {}

Config.Core = "qb-core" -- Your core name / folder
Config.Target = "qb-target" -- "qb-target" or "ox_target"
Config.Menu = "ox_lib" -- "qb-menu" or "ox_lib"
Config.Notify = "qb" -- "qb" / "ox" / okok
Config.Inventory = "qb" -- "qb" or "ox"
Config.HelpText = "ox" -- "qb" or "ox"
Config.Vehiclekeys = "qb" -- "qb" or "qs" or "renewed" ( open code on config_functions.lua )
Config.FuelSystem = "LegacyFuel" -- "LegacyFuel" or "okokFuel" or "ox_fuel" or "ti_fuel" or "qs-fuel" ( open code on config_functions.lua )
Config.EmoteMenu = "dpemotes" -- "dpemotes" or "rpemotes" or "scully_emotemenu" ( open code on config_functions.lua )
Config.InvLink = "qb-inventory/html/images/" -- Your directory images inventory
Config.BreakAxe = true -- Break axe when chopping trees?
Config.Chance = 10 -- Chance to break the axe | 10 = 10%
Config.NeedJob = false -- Need job?
Config.Job = "lumberjack" -- Job Needed

Config.Minigame = false -- Enable mini-game?
Config.MinigameType = "ps-ui" -- "ps-ui" or "bl_ui" or "ox_lib" ( open code on config_functions.lua )

Config.Peds = {
	[1] = {type = 4, hash= GetHashKey("a_m_m_farmer_01"), x = -568.03,  y = 5253.20,  z = 69.49, h = 77.16}, -- Starting the job
}

Config.Zones = { 
    ["Trees"] = { -- Zones to chop trees
		vector3(-510.88, 5388.94, 72.52),
		vector3(-505.14, 5391.08, 75.43),
		vector3(-492.71, 5394.9, 77.26),
		vector3(-499.98, 5400.61, 75.24),
		vector3(-557.72, 5418.73, 63.24),
		vector3(-562.07, 5421.19, 62.1),
		vector3(-501.86, 5380.23, 75.88),
		vector3(-501.78, 5377.01, 75.8),
		vector3(-501.51, 5374.06, 75.77)
	},
	["Process"] = { -- Zones to process wood or resin
		vector3(-501.81, 5267.85, 80.61),
		vector3(-500.97, 5269.91, 80.61),
		vector3(-515.02, 5263.43, 80.65),
		vector3(-517.05, 5257.44, 79.65),
		vector3(-508.54, 5257.29, 80.62)
	}
}

Config.Blips = {
	[1] = { Enable = true, Location = vector3(-568.03, 5253.20, 69.49), Sprite = 77, Display = 2, Scale = 0.8, Colour = 31, Name = "Lumberjack",},
	[2] = { Enable = true, Location = vector3(-516.58, 5257.02, 80.65), Sprite = 253, Display = 2, Scale = 0.8, Colour = 31, Name = "Process Wood",},
	[3] = { Enable = true, Location = vector3(-486.15, 5383.42, 78.71), Sprite = 79, Display = 2, Scale = 0.8, Colour = 31, Name = "Trees",},
	[4] = { Enable = true, Location = vector3(1202.3, -1316.73, 34.64), Sprite = 272, Display = 2, Scale = 0.8, Colour = 31, Name = "Warehouse Lumberjack",},
}

Config.Selling = {
	NeedTruck = true, -- If true, only with the truck the NPC gives to you.
	Location = vector3(1202.3, -1316.73, 34.64), -- Location to sell items to tickets
	Payment = {
		type = "cash", -- "cash" or "bank",
		amount = { min = 5, max = 10 } -- Each ticket
	},
}

Config.Rent = {
    Model = "phantom", -- Model of vehicle
	Trailer = "trailerlogs", -- Model of trailer
    Location = vector4(-579.88, 5243.57, 70.47, 164.18), -- Location to spawn the vehicle
	LocationTrailer = vector4(-577.47, 5252.38, 70.47, 164.18), -- Location to spawn the trailer
    Delete = vector4(-576.71, 5252.24, 70.47, 338.94), -- Location to return / delete the truck
    Fuel = "LegacyFuel", -- "LegacyFuel" or "okokFuel" or "ox_fuel" or "ti_fuel" or "qs-fuel" ( open code on config_functions.lua )
	Payment = 500, -- Payment to rent the truck
}

Config.Times = {
	TakeJob = 5000, -- Time of progressbar when you are obtaining the job
	Pickup = 3000, -- Time of progressbar when you are picking up
	Packing = 5000, -- Time of progressbar when you go packing the wood/resin
	Selling = 5000, -- Time of progressbar when you go selling wood/resin
}

Config.Drops = {
	PickupDrop = { -- List of items received when chop tree's
		"wood",
		"resin",
		"leaf",
	},
	pickup = { -- Amount received when chop tree's
		level1 = { min = 1, max = 2 }, -- Axe level 1
		level2 = { min = 2, max = 3 }, -- Axe level 2
		level3 = { min = 3, max = 4 }, -- Axe level 3
		level4 = { min = 4, max = 5 }, -- Axe level 4
		level5 = { min = 5, max = 6 }, -- Axe level 5
	}, 
}

Config.Process = {
    ["wood_packaged"] = { 
        hash = "wood_packaged", 
        label = "Packaged Wood",
        materials = {
            [1] = { item = "wood",	amount = 5 },
        }
    },
    ["resin_packaged"] = { 
        hash = "resin_packaged", 
        label = "Packaged Resin",
        materials = {
            [1] = { item = "resin",	amount = 5 },
        }
    },
}

Config.Upgrades = {
    ["axelevel2"] = { 
        hash = "axelevel2", 
        label = "Axe Level 2",
        materials = {
            [1] = { item = "axelevel1",	amount = 1 },
			[2] = { item = "wood",	amount = 10 },
        }
    },
    ["axelevel3"] = { 
        hash = "axelevel3", 
        label = "Axe Level 3",
        materials = {
            [1] = { item = "axelevel2",	amount = 1 },
			[2] = { item = "wood",	amount = 20 },
        }
    },
	["axelevel4"] = { 
        hash = "axelevel4", 
        label = "Axe Level 4",
        materials = {
            [1] = { item = "axelevel3",	amount = 1 },
			[2] = { item = "wood",	amount = 30 },
        }
    },
	["axelevel5"] = { 
        hash = "axelevel5", 
        label = "Axe Level 5",
        materials = {
            [1] = { item = "axelevel4",	amount = 1 },
			[2] = { item = "wood",	amount = 40 },
        }
    },
}C
```

{% endtab %}

{% tab title="functions.lua" %}

```lua
function Notify(msg, type, time)
    if Config.Notify == "qb" then
        QBCore.Functions.Notify(msg, type, time)
    elseif Config.Notify == "okok" then
        exports['okokNotify']:Alert('Notification', msg, time, type, true)
    elseif Config.Notify == "ox" then
        lib.notify({ title = 'Notification', description = msg, type = type })
    end
end

function SetFuel(veh)
    if Config.FuelSystem == "LegacyFuel" then
        exports["LegacyFuel"]:SetFuel(veh, 100.0)
    elseif Config.FuelSystem == "okokFuel" then
        exports['okokGasStation']:SetFuel(veh, 100.0)
    elseif Config.FuelSystem == "ox_fuel" then
        SetVehicleFuelLevel(veh, 100.0)
    elseif Config.FuelSystem == "ti_fuel" then
        exports["ti_fuel"]:setFuel(veh, 100.0, "RON91")
    elseif Config.FuelSystem == "qs-fuel" then
        exports['qs-fuelstations']:SetFuel(veh, 100.0)
    end
end

function GiveKeys(veh)
    local plate = GetVehicleNumberPlateText(veh)
    local model = GetDisplayNameFromVehicleModel(GetEntityModel(veh))
    if Config.Vehiclekeys == "qb" then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    elseif Config.Vehiclekeys == "qs" then
        exports['qs-vehiclekeys']:GiveKeys(plate, model)
    elseif Config.Vehiclekeys == "renewed" then
        exports['Renewed-Vehiclekeys']:addKey(plate)
    end
end

function RemoveKeys(spawnedVehicle)
    exports['qs-vehiclekeys']:RemoveKeysAuto(spawnedVehicle)
end

function SendHelpText(msg, position)
    if not position then position = "right" end
    if Config.HelpText == "qb" then
        exports['qb-core']:DrawText(msg, position)
    elseif Config.HelpText == "ox" then
        lib.showTextUI(msg, {
            position = "right-center",
        })
    end
end

function RemoveHelpText()
    if Config.HelpText == "qb" then
        exports['qb-core']:HideText()
    elseif Config.HelpText == "ox" then
        lib.hideTextUI()
    end
end

function StartMinigame(callback)
    if Config.MinigameType == "ps-ui" then
        exports['ps-ui']:Circle(function(success)
            callback(success)
        end, 2, 20)
    elseif Config.MinigameType == "bl_ui" then
        local success = exports.bl_ui:CircleProgress(1, 20)
        callback(success)
    elseif Config.MinigameType == "ox_lib" then
        local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'}, {'w', 'a', 's', 'd'})
        callback(success)
    end
end

function StartAnimation(animation)
    if Config.EmoteMenu == "dpemotes" then
        TriggerEvent('animations:client:EmoteCommandStart', {animation})
    elseif Config.EmoteMenu == "rpemotes" then
        exports["rpemotes"]:EmoteCommandStart(animation)
    elseif Config.EmoteMenu == "scully" then
        exports["scully_emotemenu"]:playEmoteByCommand(animation)
    end
end

function StopAnimation()
    if Config.EmoteMenu == "dpemotes" then
        TriggerEvent('animations:client:EmoteCommandStart', {"c"})
    elseif Config.EmoteMenu == "rpemotes" then
        exports["rpemotes"]:EmoteCommandStart("c")
    elseif Config.EmoteMenu == "scully_emotemenu" then
        exports["scully_emotemenu"]:cancelEmote()
    end
end
```

{% endtab %}
{% endtabs %}
