59 online 20 members  + Join RP Base  +
FreeScriptQBoxQBCore

z-weedsystem

by Z3MO  ·  version 2026.04.26  ·  updated 19 days ago

No reviews yet

Downloads
0
Reviews
0
Size
1.7 MB
Code check
Clean
Licence
GPL-3.0
Released
Nov 2026

A modern, feature-rich weed cultivation system for FiveM (QBCore/QBXCore).

z-weedsystem
z-weedsystem
A modern, feature-rich weed cultivation system for FiveM servers using QBCore/QBXCore with ox_lib/ox_inventory support.
🌿 Features
  • Realistic Growth System - Plants grow over 2 hours with 5 visual stages
  • NPK Fertilizer System - Nitrogen, Phosphorus, Potassium management with min/max values
  • Strain Genetics - Deterministic strain naming based on NPK values (63,000+ possible strains)
  • Quality System - Dynamic quality calculation based on NPK ratios and water levels
  • Water Management - Plants require watering every 15 minutes
  • Ground Type Modifiers - 9 different ground surfaces affect plant growth
  • Male/Female Plants - Breeding system with seed generation
  • Reputation System - Track player expertise with named strains
  • Modern UI - Support for ox_lib, qb-input, qb-menu, ox_target
  • Inventory Integration - Works with ox_inventory and qb-core inventory
📋 Requirements 🚀 Installation1. Download & Install
  1. Download or clone this repository
  2. Place the z-weedsystem folder in your server's directory and enusre in server.cfg
  3. Ensure all dependencies are installed and started before z-weedsystem
2. Database Setup
Import the SQL file to your database:
Or import via phpMyAdmin/HeidiSQL by running the weed.sql file.
3. Configuration
Edit config.lua to customize:

PlantConfig = {
    GrowthTime = 120,        -- Plant growth time in minutes (120 = 2 hours)
    WaterDepletion = 5,      -- Water depletion interval in minutes and also level of water depleted
    WaterAdd = 20,            -- How much water one bottle adds
    HarvestPercent = 95,       -- Minimum growth % to harvest
    MaleFactor = 1.3,         -- Male plants grow 30% slower compared to female plant
    FertilizerFactor = 1.54,   -- Fertilizer effectiveness multiplier
    -- ... more settings
}

4. Add to server.cfg
ensure ox_lib
ensure ox_target / qb-target
ensure oxmysql
ensure ox_inventory  # Optional
ensure z-weedsystem

🎮 How It WorksPlanting Seeds
  1. Get a female weed seed (from male plants or NPC shops)
  2. Use the seed item from your inventory
  3. Aim at valid ground (grass, wet ground, etc.)
  4. Press E to plant (within 2.5m of your character)
  5. Press Backspace to cancel
Growing Plants
  1. Water plants every 15 minutes using water bottles
  2. Add fertilizer (once per plant) with custom NPK values:
  • Nitrogen (N): 1-80
  • Phosphorus (P): 1-61
  • Potassium (K): 1-20
  1. Monitor growth - 5 visual stages from seedling to harvest-ready
  2. Harvest at 95%+ growth for best yields
Strain System
  1. Hold a female seed with genetics
  2. Access the strain menu (via item or command)
  3. Name your strain - creates a unique name based on NPK values
  4. Reuse strains - plant new seeds with the same genetics
NPK & Quality
Quality is calculated based on:
  • NPK Sum - Higher values = better quality
  • Water Factor - Optimal at 70-80% water
  • Ground Type - Wet ground (type 8) gives best modifiers
  • Fertilizer - Apply once at the right growth stage

Perfect Strain Example:
  • N=80, P=61, K=20 (max values)
  • Water at 75%
  • Plant on wet ground
  • Result: Legendary quality!
🎯 Controls
Action, Control

Plant Seed, E (when aiming at valid ground)
Cancel Planting, Backspace or G
Harvest Plant, E (when near mature plant)
Inspect Plant, E (target interaction)
📦 Item List
  • female_weed_seed - Produces buds when harvested
  • male_weed_seed - Produces more seeds when harvested
  • trowel - Required to plant seeds
  • small_scale - Required for packaging
  • rolling_paper - Required for making joints
  • water_bottle - Waters plants (adds 20% water)
  • weed_nutrition - Fertilizer (adds NPK values)
  • wet_weed_bud - Harvested buds (needs drying)
  • dry_weed_bud - Dried buds (can package)
  • packed_weed_bud - Packaged weed (can make joints)
  • weed_baggy - Bagged weed (24 per package)
  • joint - Ready-to-smoke joints (10 per pack)
🔧 Framework CompatibilityQBCore
-- Works out of the box
-- Uses: Framework.Functions.GetPlayerData()
-- Uses: Framework.Functions.HasItem()
-- Uses: Framework.Functions.Notify()

QBXCore
-- Auto-detected
-- Uses: exports.qbx_core:GetCoreObject()
-- Uses: exports.qbx_core:GetPlayer()

Inventory Systemsox_inventory
-- Auto-detected
-- Uses: exports.ox_inventory:Search()
-- Uses: exports.ox_inventory:AddItem()
-- Uses: exports.ox_inventory:RegisterUsableItem()

QBCore Inventory
-- Falls back automatically
-- Uses: Framework.Functions.GetItemByName()
-- Uses: Framework.Functions.AddItem()

🎨 UI Compatibilityox_lib (Recommended)
  • Uses lib.notify() for notifications
  • Uses lib.progressBar() for progress bars
  • Uses lib.inputDialog() for input dialogs
  • Uses lib.showContext() for context menus
QB-Input / QB-Menu
  • Falls back automatically
  • Uses exports['qb-input']:ShowInput()
  • Uses exports['qb-menu']:openMenu()
Target Systemsox_target (Recommended)
exports.ox_target:addModel()
exports.ox_target:addLocalEntity()

qb-target
exports['qb-target']:AddTargetModel()
exports['qb-target']:AddTargetEntity()

🐛 TroubleshootingPlants not growing?
  • Check GrowthTime in config (default 120 minutes)
  • Verify server time with GetCloudTimeAsInt()
Can't add fertilizer?
  • Ensure plant is not at 100% growth
  • Check if fertilizer was already added (plant.fertilizer == 1)
  • Verify you have weed_nutrition item
Strain names not generating?
  • Ensure NPK v

…