m-Scripts
  • m-Scripts Documentation
  • QBCore
    • Jobs
      • 🚗[QB] TunerJob
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🍞[QB] BeanMachine
        • 🛠️Installation
        • 🗒️Config
      • 🍔[QB] Burgershot
        • 🛠️Installation
        • 🗒️Config
      • 🍈[QB] CoolBeans
        • 🛠️Installation
        • 🗒️Config
      • 🚚[QB] Deliveries
        • 🛠️Installation
        • 📃Config
          • 📃config_functions
      • 🍎[QB] Farming
        • 🛠️Installation
        • 🗒️Config
      • 🐟[QB] Fishing
        • 🛠️Installation
        • 🗒️Config
          • 📄config_diving
          • 📄config_fishingnet
          • 📄config_fishingrod
          • 📄config_functions
          • 📄config_language
          • 📄config_seashells
          • 📄config_tournament
          • 📄config_upgrades
      • 🚛[QB] Garbage
        • 🛠️Installation
        • 🗒️Config
      • 🗝️[QB] GoldRush
        • 🛠️Installation
        • 🗒️Config
      • ⛰️[QB] Hunting
        • 🛠️Installation
        • 🗒️Config
      • 🪵[QB] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[QB] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🛢️[QB] Oil Factory
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • ☕[QB] Pond Coffee
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🚚[QB] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🥃[QB] Vanilla
        • 🛠️Installation
        • 🗒️Config
      • 🛻[QB] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • 🥃[QB] Bahamas
        • 🛠️Installation
        • 📄Config
      • 🔫[QB] Ammunation
        • 🛠️Installation
        • 📄Config
      • 🐟[QB] Pearls
        • 🛠️Installation
        • 📄Config
      • 🔓[QB] Impound
        • 🛠️Installation
        • 📄Config
        • ✅Garages
      • 🚘[QB] Vehicleshop
        • 🛠️Installation
        • 📄Config
          • Functions
          • Job
          • Language
        • ❓Common Questions
    • General
      • 🏕️[QB] Camping
        • 🛠️Installation
        • 🗒️Config
          • Consumables
          • Language
      • 🎄[QB] Christmas
        • 🛠️Installation
        • 🗒️Config
      • 🎃[QB] Halloween
        • 🛠️Installation
        • 🗒️Config
      • 📔[QB] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 🗒️Config
        • 🔁Server-Exports
      • 🏘️[QB] Vespucci
        • 🛠️Installation
        • 🗒️Config
          • Brewery
          • Digital Den
          • Masquerade
          • Pro Bikes
      • 🏖️[QB] Beach Activities
        • 🛠️Installation
        • 🗒️Config
      • 🚘[QB] Car Rental
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • ✈️[QB] Sky Racing
        • 🛠️Installation
        • 📄Config
      • 🚘[QB] Car Wash
        • 🛠️Installation
        • 📄Config
      • 🪨[QB] Grinder
        • 🛠️Installation
        • 📄Config
      • 📹[QB] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
      • 🏠[QB] Motel
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • 🏚️[QB] Job Center
        • 📄Config
      • 🛠️[QB] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
    • Illegal
      • 🔫[QB] Gangs
        • 🛠️Installation
        • 🗒️Config
      • 🔔[QB] Drug Selling
        • 🗒️Config
      • 🌱[QB] Drugs
        • 🛠️Installation
        • 🗒️Config
      • 🍯[QB] Craft Potion
        • 🛠️Installation
        • 🗒️Config
      • 🅱️[QB] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🚗[QB] Car Thief
        • 🗒️Config
      • 🏠[QB] House Robbery
        • 🛠️Installation
        • 🗒️Config
      • 💎[QB] Jewelry
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ®️[QB] Mini Robberys
        • 🛠️Installation
        • 🗒️Config
      • 💰[QB] MoneyWash
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🔫[QB] Rob NPC
        • 🛠️Installation
        • 🗒️Config
      • 🏃‍♂️[QB] Runs
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ⛽[QB] Steal Fuel
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🏬[QB] Store Robbery
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🪛[QB] Scrapyard
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 👾[QB] Territories
        • 🛠️Installation
        • 📄Config
          • Functions
      • 🏨[QB] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • ESX
    • Jobs
      • 🚗[ESX] Tunerjob
        • ❗Dependencies
        • 🛠️Installation
          • ℹ️OX-Inventory
          • ℹ️QS-Inventory
        • 🗒️Config
          • BlacklistVehicles
          • Craft
          • Functions
          • Language
          • Targets
          • Wraps
          • Events
        • ❓Common Questions
      • 🚚[ESX] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🪵[ESX] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • 🛻[ESX] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[ESX] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🎣[ESX] Fishing
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • Diving
          • Fishingnet
          • Fishingrod
          • Seashells
          • Tournament
          • Upgrades
    • General
      • 🚘[ESX] Car Rental
        • 🛠️Installation
        • 🗒️Config
      • 📃[ESX] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 📄Config
        • 🔁 Server-Exports
      • 🚘[ESX] Car Wash
        • 🛠️Installation
        • 📄Config
      • 📹[ESX] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
        • 🏠[ESX] Motel
          • 🛠️Installation
          • 📄Config
          • 🖥️Compatibilities
      • 🛠️[ESX] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🎄[ESX] Christmas
        • 🛠️Installation
        • 📄Configs
    • Illegal
      • 🔫[ESX] Gangs
        • 🛠️Installation
        • 📄Config
        • ❓Common Questions
      • 🅱️[ESX] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🏨[ESX] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • Both Framework
    • Scripts
      • 🚗Car Rebuild
        • 🛠️Installation
        • 🗒️Config
      • 🗺️City Guide
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🛒Shops
        • 📄Config
        • 🛠️Installation
      • 🔁Reputation
        • 📄Config
        • 🛠️Installation
        • ⁉️Exports & Commands
          • Server Exports
          • Commands
      • 💤AFK System
        • 📄Configs
        • 🛠️Installation
      • 🚗Garages
        • 🛠️Installation
        • 📑User Guide
          • Create Garages
          • Create Private Garage
          • Impound & Auctions
          • Add vehicle to gang/job
          • Commands
      • ✈️Airplane Job
        • 🛠️Installation
        • 📃Configs
        • ℹ️Exports
      • 📋Scoreboard
        • 📃Config
      • 📦StorageUnits
        • 🛠️Installation
        • 📃Config
Powered by GitBook
On this page
  1. QBCore
  2. Jobs
  3. [QB] Lumberjack

Config

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
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
PreviousInstallationNext[QB] Mining

Last updated 2 months ago

🪵
🗒️