Documentation

Setup

Install and configure Plants.

#Download

Download Zyke's Plants from your CFX portal under Granted Assets. If it is missing from your portal, see Lacking Entitlement.

#Dependencies

Install oxmysql, zyke_lib, and a target resource such as ox_target or qb-target. Configure the framework, inventory, and target in zyke_lib. See Dependencies.

#Resource

Place the resource in your server's resources folder as zyke_plants. Keep the folder name as it is.

#Items & Images

Copy the matching definitions into your inventory:

  • ox_inventory: zyke_plants/extras/ox_items.lua into ox_inventory/data/items.lua.
  • QBCore / Qbox: zyke_plants/extras/items.lua into your shared items.

Copy the images from zyke_plants/extras/images/ into the inventory's image directory.

The items are the seeds (weed_seed, coke_seed), the pot, shovel, light, and fertilizer used to plant and tend them, and the harvested leaves (weedleaf_quality0 to 2 and cokeleaf_quality0 to 2). The leaves are the same items Drugdealer buys, so add them only once if you run both.

Watering uses your server's existing water item: water_bottle on QBCore, water on other frameworks.

ox_inventory finds an image by the item's name. The leaves share weed_baggy.png and cocaine_baggy.png, and fertilizer uses weed_nutrition.png. Copy those images under each item's name, or add client = { image = "weed_baggy.png" } to the item.

#Database

The zyke_plants table is created on the first start, so there is no SQL to import.

#Configuration

Edit shared/unlocked/config.lua. Review the plants, their growth, water, light, and nutrition, and the rewards. Use the Config reference for the current defaults.

#Start Order

Start the dependencies before Plants:

cfg
ensure oxmysql
ensure ox_target
ensure zyke_lib
ensure zyke_plants

Replace ox_target with your target resource if you use another one.

#Verify Gameplay

Give yourself a weed_seed, a pot, a shovel, and water, then use the seed to plant it. Tend the plant through your target, and check that it is still there after a restart.