Weed Planting
How to install Nevera Development - Weed Planting script.
This script is compatible with ESX and QB.
This script requires ox_lib.
Script
Installation
Download from keymaster and unzip the
Weed Planting
. Movenv_weedplanting
in your server's resource folder.Add the resource to your server start config:
ensure nv_weedplanting
, the name of the folder must not be changed or the resource will not function correctly. Ensure the script is the latest one.
# ...
# All the other resources
ensure nv_weedplanting
Open the config.lua and configure it correctly, paying attention to all the variables!
Set
config.framework
to"ESX"
Restart server or type
ensure nv_weedplanting
in console.
Inventory Items
Open the
inventory-data
folder and theox-items.lua
file, then copy the items from that file.Navigate to your
ox_inventory
script, open thedata
folder, and then open theitems.lua
file.Add your ox items to that file (example):
-- ... default ox items
['clothing'] = {label = 'Clothing',consume = 0,},
['mastercard'] = {label = 'Fleeca Card',stack = false,weight = 10,client = {image = 'card_bank.png'}},
-- your items
['weed-seedling'] = {label = 'Weed Seedling',weight = 5000,client = {event = 'nv_weedplanting:client:createWeedPot',image = 'weed-seedling.png',}},
['weed-bud'] = {label = 'Weed Bud',weight = 1,client = {image = 'weed-bud.png'}},
-- ...
Go to the
ox_inventory/web/images
folder and paste the images frominventory-data
.
Code
config = {}
--=========== Framework ===========--
-- ESX - ESX Framework
-- QB - QBCore Frameowk
config.framework = "ESX"
--=================================--
--=========== Inventory ===========--
-- OX - OX Inventory
-- QB - QB Inventory
config.inventory = "OX"
--=================================--
--=========== Targets ===========--
config.ox_target = true -- If you want to turn on, set this to -> true
config.qb_target = false -- If you want to turn on, set this to -> true
--===============================--
--=========== Notification ===========--
config.notifyName = "Jhon Smith"
config.notifyDesc = "Weed-Shop Owner"
config.notifyIcon = "CHAR_ARTHUR"
config.webhook = "" -- Discord Webhook
--====================================--
--=========== Shop ===========--
config.shop = {
{name="Weed Seedling",price=10,inventory="weed-seedling",image="weed-seedling.png",desc=""},
{name="Pest Spray",price=30,inventory="pest-spray",image="pest-spray.png",desc=""},
{name="Weed Food",price=40,inventory="weed-food",image="weed-food.png",desc=""},
{name="Weed Bud",price=50,inventory="weed-bud",image="weed-bud.png",desc="1 gram"},
{name="Rolling Paper",price=60,inventory="rolling-paper",image="rolling-paper.png",desc=""},
{name="Joint",price=70,inventory="joint",image="joint.png",desc=""},
}
config.blips = {
{loc=vec3(-1172.0760, -1572.0536, 4.6637),name="Weed Shop",icon=140,color=2}
}
config.LANGUAGE = {
-- Info bar
infoWater = "Water",
infoHunger = "Hunger",
infoAge = "Age",
infoHealth = "Health",
infoPest = "Pest",
-- Progress bar --
makeJoint = "Making joint...",
waterPlant = "Watering...",
foodPplant = "Feeding...",
sprayPlant = "Spraying...",
destroyPlant = "Destroying..."
}
--====================================--
--=========== Timeout ===========--
config.harvestWait = 20000 -- 20 seconds = 20000ms
config.sprayWait = 10000 -- 10 seconds = 10000ms
config.feedWait = 8000 -- 8 seconds = 8000ms
config.waterWait = 8000 -- 8 seconds = 8000ms
config.makeJoint = 5000
config.destroyWait = 5000
--===============================--
--=========== Joint Settings ===========--
config.jointDuration = 30000 -- 30 seconds = 30000ms
config.jointEffect = "DRUG_2_drive" -- you can change the effect if you want, the effect list is on this website: https://wiki.rage.mp/index.php?title=Timecycle_Modifiers
config.jointHP = 20 -- +20 HP when using a joint
--======================================--
--=========== Target Settings ===========--
-- You can find icons on "https://fontawesome.com/" but you can use only FREE icons!
-- distance does not work for qbtarget
config.target_status = {name="Status", color="white", icon="fa-circle-info", distance=1.2}
config.target_carry = {name="Carry", color="orange", icon="fa-hands-holding", distance=1.2}
config.target_pour = {name="Water", color="lime", icon="fa-water", distance=1.2}
config.target_feed = {name="Feed", color="lime", icon="fa-wheat-awn", distance=1.2}
config.target_pestSpray = {name="Pest spray", color="lime", icon="fa-bug", distance=1.2}
config.target_destroy = {name="Destroy", color="red", icon="fa-bug", distance=1.2}
config.target_harvest = {name="Harvest", color="red", icon="fa-scissors", distance=1.2}
config.target_openShop = {name="Open Weed Shop", color="lime", icon="fa-cart-shopping", distance=2.5}
--=======================================--
--=========== Other ===========--
-- 3 hours / (how many minutes it takes for weed to grow, during this time if the plant is in good health, the player can harvest the plant; if not, the plant will die) / recommended 180 minutes / 3 hours
config.weedGrowTime = 180 -- minutes
-- 2 hour (how many hours the plant waits to be deleted after full grown) / recommended 2 hours
config.weedDeadAfterTime = 120 -- minutes
-- 1 hour = 60
-- 2 hour = 120
-- 3 hour = 180
-- 4 hour = 240
-- 5 hour = 300
-- 6 hour = 360
-- 7 hour = 420
-- 8 hour = 480
-- 9 hour = 540
-- 10 hour = 600
config.weedDeadAfterTime = 24 -- hours (how many hours the plant waits to be deleted after full grown) / recommended 24 hours
Support
Last updated