Installation
Dependencies
QBCore Framework qb-inventory (Custom inventory possible)
ESX Framework ox_inventory (Custom inventory possible)
How to install
Drag the script in your folder, run the SQL player_drugs
Add the following item to yourinventory/data/items.lua
QBCore users to qbcore/shared/items.lua
Add the item image to your inventory/images
-- Weed
["weed"] = {
["name"] = "weed",
["label"] = "Weed Bag 2g",
["weight"] = 10,
["type"] = "item",
["image"] = "weed_baggy.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = false,
["combinable"] = nil,
["description"] = "A weed bag with 2g"
},
-- Seeds
["seed_weed"] = {
["name"] = "seed_weed",
["label"] = "Weed Seed",
["weight"] = 2,
["type"] = "item",
["image"] = "weed-plant-seed.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = false,
["combinable"] = nil,
["description"] = "Marijuana Seed"
},
--raw weed
["raw_weed"] = {
["name"] = "raw_weed",
["label"] = "Weed Plant",
["weight"] = 150,
["type"] = "item",
["image"] = "harvested_weed.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = false,
["combinable"] = nil,
["description"] = "Raw Weed Plant"
},
--Trowel
["trowel"] = {
["name"] = "trowel",
["label"] = "Trowel",
["weight"] = 100,
["type"] = "item",
["image"] = "trowel.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = ""
},
--Empty bottle
["empty_bottle"] = {
["name"] = "empty_bottle",
["label"] = "Empty Bottle",
["weight"] = 10,
["type"] = "item",
["image"] = "empty_bottle.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = "Empty bottle to fill with water"
},Example for ox_inventory
Create custom Weed Plants
This is an example how to create a custom Weed Plant.
Create the custom Weed Plant as a Item and add it to yourinventory/items.lua
"raw_purple_weed" is that what you get on harvesting. "purple_weed" is that what you get after proceeding the Weed Plant.
Add the new custom Weed Plant to your configuration.
You need "raw_purple_weed" to process "purple_weed"
Make sure to add the final item to the Sell list to sell it.
Last updated