Lumberjack Job hands out real inventory items: nine kinds of wood and by-products from the trees, three planks from the chopping block, and the three axes sold in the shop. Every one of them has to exist in your inventory's item list before the first player picks up an axe.
The Items#
Item | Label | Where it comes from | Price |
|---|---|---|---|
| Pine wood | Every pine | $5 |
| Pine resin | Pine, 20% chance, up to 3 | $7 |
| Wood Shavings | Pine, 10% chance, up to 2 | $9 |
| Oak wood | Every oak | $6 |
| Oak Bark | Oak, 20% chance, up to 3 | $8 |
| Arcorn | Oak, 10% chance, up to 2 | $10 |
| Maple wood | Every maple | $7 |
| Strong fiber | Maple, 20% chance, up to 3 | $9 |
| Maple syrup extract | Maple, 10% chance, up to 2 | $11 |
| Pine Wood Plank | Chopping block, from | $10 |
| Oak Wood Plank | Chopping block, from | $12 |
| Maple Wood Plank | Chopping block, from | $14 |
| Rusty Axe | Shop, level 1 | $50 to buy |
| Iron-Edged Axe | Shop, level 3 | $300 to buy |
| Mythical Axe | Shop, level 6 | $2,000 to buy |
Prices are what the shop pays for one unit, read from Config.WoodTypes, Config.ChopWood and Config.AxeLevel. Renaming an item means renaming it in both places — the config and the inventory.
Item Images#
All fifteen pictures are in [qs-lumberjack-installation]/images, each named after its item. Copy them into your inventory's image folder:
Inventory | Folder |
|---|---|
ox_inventory |
|
qs-inventory |
|
qb-inventory |
|
Adding the Items#
Pick the tab for the inventory your server runs. Each one already carries the right way to equip an axe.
Add to ox_inventory/data/items.lua:
-- Wood and by-products
['pine_wood'] = { label = 'Pine wood', weight = 250, close = true, description = 'A strong piece of pine wood.' },
['pine_resin'] = { label = 'Pine resin', weight = 150, close = true, description = 'Sticky resin extracted from pine trees.' },
['wood_shavings'] = { label = 'Wood Shavings', weight = 100, close = true, description = 'Fine shavings from wood carving.' },
['oak_wood'] = { label = 'Oak wood', weight = 250, close = true, description = 'A dense and durable oak wood log.' },
['oak_bark'] = { label = 'Oak Bark', weight = 150, close = true, description = 'Thick bark from an oak tree.' },
['arcorn'] = { label = 'Arcorn', weight = 100, close = true, description = 'A small arcorn, seed of the oak.' },
['maple_wood'] = { label = 'Maple wood', weight = 250, close = true, description = 'A smooth and solid maple wood log.' },
['strong_fiber'] = { label = 'Strong fiber', weight = 150, close = true, description = 'Durable natural fiber from tree bark.' },
['maple_syrup_extract'] = { label = 'Maple syrup extract', weight = 100, close = true, description = 'Thick extract used to make maple syrup.' },
-- Planks
['pinewood_plank'] = { label = 'Pine Wood Plank', weight = 100, close = true, description = 'A sturdy plank made from pine wood.' },
['oakwood_plank'] = { label = 'Oak Wood Plank', weight = 100, close = true, description = 'A solid plank crafted from oak wood.' },
['maplewood_plank'] = { label = 'Maple Wood Plank', weight = 100, close = true, description = 'A refined plank cut from maple wood.' },
-- Axes
['axe_rusty'] = {
label = 'Rusty Axe',
weight = 8,
stack = false,
close = true,
client = { export = 'qs-lumberjack.toggleAxe' },
},
['axe_iron'] = {
label = 'Iron-Edged Axe',
weight = 8,
stack = false,
close = true,
client = { export = 'qs-lumberjack.toggleAxe' },
},
['axe_mythical'] = {
label = 'Mythical Axe',
weight = 8,
stack = false,
close = true,
client = { export = 'qs-lumberjack.toggleAxe' },
},Add to qs-inventory/shared/items.lua:
-- Wood and by-products
['pine_wood'] = { ['name'] = 'pine_wood', ['label'] = 'Pine wood', ['weight'] = 250, ['type'] = 'item', ['image'] = 'pine_wood.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'A strong piece of pine wood.' },
['pine_resin'] = { ['name'] = 'pine_resin', ['label'] = 'Pine resin', ['weight'] = 150, ['type'] = 'item', ['image'] = 'pine_resin.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'Sticky resin extracted from pine trees.' },
['wood_shavings'] = { ['name'] = 'wood_shavings', ['label'] = 'Wood Shavings', ['weight'] = 100, ['type'] = 'item', ['image'] = 'wood_shavings.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'Fine shavings from wood carving.' },
['oak_wood'] = { ['name'] = 'oak_wood', ['label'] = 'Oak wood', ['weight'] = 250, ['type'] = 'item', ['image'] = 'oak_wood.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'A dense and durable oak wood log.' },
['oak_bark'] = { ['name'] = 'oak_bark', ['label'] = 'Oak Bark', ['weight'] = 150, ['type'] = 'item', ['image'] = 'oak_bark.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'Thick bark from an oak tree.' },
['arcorn'] = { ['name'] = 'arcorn', ['label'] = 'Arcorn', ['weight'] = 100, ['type'] = 'item', ['image'] = 'arcorn.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'A small arcorn, seed of the oak.' },
['maple_wood'] = { ['name'] = 'maple_wood', ['label'] = 'Maple wood', ['weight'] = 250, ['type'] = 'item', ['image'] = 'maple_wood.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'A smooth and solid maple wood log.' },
['strong_fiber'] = { ['name'] = 'strong_fiber', ['label'] = 'Strong fiber', ['weight'] = 150, ['type'] = 'item', ['image'] = 'strong_fiber.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'Durable natural fiber from tree bark.' },
['maple_syrup_extract'] = { ['name'] = 'maple_syrup_extract', ['label'] = 'Maple syrup extract', ['weight'] = 100, ['type'] = 'item', ['image'] = 'maple_syrup_extract.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'Thick extract used to make maple syrup.' },
-- Planks
['pinewood_plank'] = { ['name'] = 'pinewood_plank', ['label'] = 'Pine Wood Plank', ['weight'] = 100, ['type'] = 'item', ['image'] = 'pinewood_plank.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'A sturdy plank made from pine wood.' },
['oakwood_plank'] = { ['name'] = 'oakwood_plank', ['label'] = 'Oak Wood Plank', ['weight'] = 100, ['type'] = 'item', ['image'] = 'oakwood_plank.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'A solid plank crafted from oak wood.' },
['maplewood_plank'] = { ['name'] = 'maplewood_plank', ['label'] = 'Maple Wood Plank', ['weight'] = 100, ['type'] = 'item', ['image'] = 'maplewood_plank.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'A refined plank cut from maple wood.' },
-- Axes
['axe_rusty'] = {
['name'] = 'axe_rusty', ['label'] = 'Rusty Axe', ['weight'] = 8, ['type'] = 'item', ['image'] = 'axe_rusty.png',
['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'A worn axe that still bites.',
client = { export = 'qs-lumberjack.toggleAxeQuasar' },
},
['axe_iron'] = {
['name'] = 'axe_iron', ['label'] = 'Iron-Edged Axe', ['weight'] = 8, ['type'] = 'item', ['image'] = 'axe_iron.png',
['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'A sturdy axe with an iron edge.',
client = { export = 'qs-lumberjack.toggleAxeQuasar' },
},
['axe_mythical'] = {
['name'] = 'axe_mythical', ['label'] = 'Mythical Axe', ['weight'] = 8, ['type'] = 'item', ['image'] = 'axe_mythical.png',
['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'A legendary axe that fells anything.',
client = { export = 'qs-lumberjack.toggleAxeQuasar' },
},For qb-inventory, add to qb-core/shared/items.lua. The axes are registered as usable items by the script on start, so they need nothing extra.
-- Wood and by-products
pine_wood = { name = 'pine_wood', label = 'Pine wood', weight = 250, type = 'item', image = 'pine_wood.png', unique = false, useable = false, shouldClose = true, description = 'A strong piece of pine wood.' },
pine_resin = { name = 'pine_resin', label = 'Pine resin', weight = 150, type = 'item', image = 'pine_resin.png', unique = false, useable = false, shouldClose = true, description = 'Sticky resin extracted from pine trees.' },
wood_shavings = { name = 'wood_shavings', label = 'Wood Shavings', weight = 100, type = 'item', image = 'wood_shavings.png', unique = false, useable = false, shouldClose = true, description = 'Fine shavings from wood carving.' },
oak_wood = { name = 'oak_wood', label = 'Oak wood', weight = 250, type = 'item', image = 'oak_wood.png', unique = false, useable = false, shouldClose = true, description = 'A dense and durable oak wood log.' },
oak_bark = { name = 'oak_bark', label = 'Oak Bark', weight = 150, type = 'item', image = 'oak_bark.png', unique = false, useable = false, shouldClose = true, description = 'Thick bark from an oak tree.' },
arcorn = { name = 'arcorn', label = 'Arcorn', weight = 100, type = 'item', image = 'arcorn.png', unique = false, useable = false, shouldClose = true, description = 'A small arcorn, seed of the oak.' },
maple_wood = { name = 'maple_wood', label = 'Maple wood', weight = 250, type = 'item', image = 'maple_wood.png', unique = false, useable = false, shouldClose = true, description = 'A smooth and solid maple wood log.' },
strong_fiber = { name = 'strong_fiber', label = 'Strong fiber', weight = 150, type = 'item', image = 'strong_fiber.png', unique = false, useable = false, shouldClose = true, description = 'Durable natural fiber from tree bark.' },
maple_syrup_extract = { name = 'maple_syrup_extract', label = 'Maple syrup extract', weight = 100, type = 'item', image = 'maple_syrup_extract.png', unique = false, useable = false, shouldClose = true, description = 'Thick extract used to make maple syrup.' },
-- Planks
pinewood_plank = { name = 'pinewood_plank', label = 'Pine Wood Plank', weight = 100, type = 'item', image = 'pinewood_plank.png', unique = false, useable = false, shouldClose = true, description = 'A sturdy plank made from pine wood.' },
oakwood_plank = { name = 'oakwood_plank', label = 'Oak Wood Plank', weight = 100, type = 'item', image = 'oakwood_plank.png', unique = false, useable = false, shouldClose = true, description = 'A solid plank crafted from oak wood.' },
maplewood_plank = { name = 'maplewood_plank', label = 'Maple Wood Plank', weight = 100, type = 'item', image = 'maplewood_plank.png', unique = false, useable = false, shouldClose = true, description = 'A refined plank cut from maple wood.' },
-- Axes
axe_rusty = { name = 'axe_rusty', label = 'Rusty Axe', weight = 8, type = 'item', image = 'axe_rusty.png', unique = true, useable = true, shouldClose = true, description = 'A worn axe that still bites.' },
axe_iron = { name = 'axe_iron', label = 'Iron-Edged Axe', weight = 8, type = 'item', image = 'axe_iron.png', unique = true, useable = true, shouldClose = true, description = 'A sturdy axe with an iron edge.' },
axe_mythical = { name = 'axe_mythical', label = 'Mythical Axe', weight = 8, type = 'item', image = 'axe_mythical.png', unique = true, useable = true, shouldClose = true, description = 'A legendary axe that fells anything.' },Qbox runs on ox_inventory, so the items go in ox_inventory/data/items.lua exactly as in the ox_inventory tab — axes included, with their qs-lumberjack.toggleAxe export.
With the default ESX inventory, run this against your database. The axes are registered as usable items by the script on start.
INSERT IGNORE INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('pine_wood', 'Pine wood', 1, 0, 1),
('pine_resin', 'Pine resin', 1, 0, 1),
('wood_shavings', 'Wood Shavings', 1, 0, 1),
('oak_wood', 'Oak wood', 1, 0, 1),
('oak_bark', 'Oak Bark', 1, 0, 1),
('arcorn', 'Arcorn', 1, 0, 1),
('maple_wood', 'Maple wood', 1, 0, 1),
('strong_fiber', 'Strong fiber', 1, 0, 1),
('maple_syrup_extract', 'Maple syrup extract', 1, 0, 1),
('pinewood_plank', 'Pine Wood Plank', 1, 0, 1),
('oakwood_plank', 'Oak Wood Plank', 1, 0, 1),
('maplewood_plank', 'Maple Wood Plank', 1, 0, 1),
('axe_rusty', 'Rusty Axe', 1, 0, 1),
('axe_iron', 'Iron-Edged Axe', 1, 0, 1),
('axe_mythical', 'Mythical Axe', 1, 0, 1);Running ESX with ox_inventory or qs-inventory instead? Use that inventory's tab — the items table is not read then.
Equipping an Axe#
Using an axe from the inventory puts it in the player's hand; using it again puts it away. How the use reaches the script depends on the inventory, and the item definitions above already wire it:
Inventory | What equips the axe |
|---|---|
ox_inventory | The item's client export |
qs-inventory | The item's client export |
qb-inventory, ESX | A usable item the script registers itself for every axe in |
If two of those routes answer the same click, the second is ignored, so the axe never comes out and goes straight back in. An axe given with /giveitem works too, with or without metadata.
Durability#
Each swing at a tree costs the axe the tree's durabilitypenalty (1 by default). On ox_inventory the remaining durability is written to the item's own metadata, starting at the axe's configured durability, so every axe in a bag wears separately. On every other inventory the script keeps the count for the player's session. When it reaches zero the axe breaks: it leaves the hand and the inventory, and the player is told to buy a new one.
Axes that are not items#
Set Config.InventoryAxe = false and the shop puts the axe straight into the player's hand instead of the bag. The three axe items are then not needed. The axe stays in hand until it breaks or the mission is abandoned, and one can be carried at a time.
To take the axes back when a mission ends or is abandoned, switch on
Config.RemoveAxe.questFinishedorConfig.RemoveAxe.abandon. Only names that are inConfig.AxeLevelare ever removed.



