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_targetorqb-target. Configure the framework, inventory, and target inzyke_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.luaintoox_inventory/data/items.lua.- QBCore / Qbox:
zyke_plants/extras/items.luainto 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), thepot,shovel,light, andfertilizerused to plant and tend them, and the harvested leaves (weedleaf_quality0to2andcokeleaf_quality0to2). 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_bottleon QBCore,wateron 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_plantstable is created on the first start, so there is no SQL to import.
#Start Order
Start the dependencies before Plants:
cfgensure oxmysql ensure ox_target ensure zyke_lib ensure zyke_plantsReplace
ox_targetwith your target resource if you use another one.
#Verify Gameplay
Give yourself a
weed_seed, apot, ashovel, 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.