Coder Social home page Coder Social logo

ps-weedplanting's Introduction

Project Sloth Weed Planting

Script provides the convenience of planting weed anywhere using both male and female seeds, along with additional features like watering, harvesting branches, drying, and packing the weed.

For all support questions, ask in our Discord support chat. Do not create issues if you need help. Issues are for bug reporting and new features only.

Preview

image image image image image image

Dependencies

Installation

  • Download ZIP
  • Drag and drop resource into your server files, make sure to remove -main in the folder name
  • Run the attached SQL script (weedplanting.sql)
  • Start resource through server.cfg
  • Restart your server.

older qb-core

Add to your qb-core > shared > items.lua

--- ps-weedplanting
['weedplant_seedm'] 			 = {['name'] = 'weedplant_seedm', 			    ['label'] = 'Male Weed Seed', 			['weight'] = 0, 		['type'] = 'item', 		['image'] = 'weedplant_seed.png', 		['unique'] = false, 	['useable'] = false, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'Male Weed Seed'},
['weedplant_seedf'] 			 = {['name'] = 'weedplant_seedf', 			    ['label'] = 'Female Weed Seed', 		['weight'] = 0, 		['type'] = 'item', 		['image'] = 'weedplant_seed.png', 		['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Female Weed Seed'},
['weedplant_branch'] 			 = {['name'] = 'weedplant_branch', 			    ['label'] = 'Weed Branch', 				['weight'] = 10000, 	['type'] = 'item', 		['image'] = 'weedplant_branch.png', 	['unique'] = true, 		['useable'] = false, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'Weed plant'},
['weedplant_weed'] 		     	 = {['name'] = 'weedplant_weed', 			    ['label'] = 'Dried Weed', 				['weight'] = 100, 		['type'] = 'item', 		['image'] = 'weedplant_weed.png', 		['unique'] = false, 	['useable'] = false, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'Weed ready for packaging'},
['weedplant_packedweed'] 		 = {['name'] = 'weedplant_packedweed', 			['label'] = 'Packed Weed', 				['weight'] = 100, 		['type'] = 'item', 		['image'] = 'weedplant_weed.png', 		['unique'] = true, 		['useable'] = false, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'Weed ready for sale'},
['weedplant_package'] 			 = {['name'] = 'weedplant_package', 			['label'] = 'Suspicious Package', 		['weight'] = 10000, 	['type'] = 'item', 		['image'] = 'weedplant_package.png', 	['unique'] = true, 		['useable'] = false, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'Suspicious Package'},
['plant_tub'] 			         = {['name'] = 'plant_tub', 			        ['label'] = 'Plant Tub', 		     	['weight'] = 1000, 		['type'] = 'item', 		['image'] = 'plant_tub.png', 		    ['unique'] = false, 	['useable'] = false, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'Pot for planting plants'},
['empty_watering_can'] 			 = {['name'] = 'empty_watering_can', 			['label'] = 'Empty Watering Can', 		['weight'] = 500, 		['type'] = 'item', 		['image'] = 'watering_can.png', 	    ['unique'] = true, 	    ['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Empty watering can'},
['full_watering_can'] 			 = {['name'] = 'full_watering_can', 			['label'] = 'Full Watering Can', 		['weight'] = 1000, 		['type'] = 'item', 		['image'] = 'watering_can.png', 	    ['unique'] = true, 	    ['useable'] = false, 	['shouldClose'] = false,	   ['combinable'] = nil,   ['description'] = 'Watering can filled with water for watering plants'},
["keya"]                         = {["name"] = "keya",                          ["label"] = "Labkey A",                 ["weight"] = 0,         ["type"] = "item",      ["image"] = "keya.png",                 ["unique"] = true,      ["useable"] = false,    ["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = "Labkey A.."},

new qb-core update

Add to your qb-core > shared > items.lua

--- ps-weedplanting
weedplant_seedm 			 = {name = 'weedplant_seedm', 			    label = 'Male Weed Seed', 			weight = 0, 		type = 'item', 		image = 'weedplant_seed.png', 		unique = false, 	useable = false, 	shouldClose = false,   combinable = nil,   description = 'Male Weed Seed'},
weedplant_seedf 			 = {name = 'weedplant_seedf', 			    label = 'Female Weed Seed', 		weight = 0, 		type = 'item', 		image = 'weedplant_seed.png', 		unique = false, 	useable = true, 	shouldClose = true,	   combinable = nil,   description = 'Female Weed Seed'},
weedplant_branch 			 = {name = 'weedplant_branch', 			    label = 'Weed Branch', 				weight = 10000, 	type = 'item', 		image = 'weedplant_branch.png', 	unique = true, 		useable = false, 	shouldClose = false,   combinable = nil,   description = 'Weed plant'},
weedplant_weed 		     	 = {name = 'weedplant_weed', 			    label = 'Dried Weed', 				weight = 100, 		type = 'item', 		image = 'weedplant_weed.png', 		unique = false, 	useable = false, 	shouldClose = false,   combinable = nil,   description = 'Weed ready for packaging'},
weedplant_packedweed 		 = {name = 'weedplant_packedweed', 			label = 'Packed Weed', 				weight = 100, 		type = 'item', 		image = 'weedplant_weed.png', 		unique = true, 		useable = false, 	shouldClose = false,   combinable = nil,   description = 'Weed ready for sale'},
weedplant_package 			 = {name = 'weedplant_package', 			label = 'Suspicious Package', 		weight = 10000, 	type = 'item', 		image = 'weedplant_package.png', 	unique = true, 		useable = false, 	shouldClose = false,   combinable = nil,   description = 'Suspicious Package'},
plant_tub 			         = {name = 'plant_tub', 			        label = 'Plant Tub', 		     	weight = 1000, 		type = 'item', 		image = 'plant_tub.png', 		    unique = false, 	useable = false, 	shouldClose = false,   combinable = nil,   description = 'Pot for planting plants'},
empty_watering_can 			 = {name = 'empty_watering_can', 			label = 'Empty Watering Can', 		weight = 500, 		type = 'item', 		image = 'watering_can.png', 	    unique = true, 	    useable = true, 	shouldClose = true,	   combinable = nil,   description = 'Empty watering can'},
full_watering_can 			 = {name = 'full_watering_can', 			label = 'Full Watering Can', 		weight = 1000, 		type = 'item', 		image = 'watering_can.png', 	    unique = true, 	    useable = false, 	shouldClose = false,	   combinable = nil,   description = 'Watering can filled with water for watering plants'},
keya                         = {name = "keya",                          label = "Labkey A",                 weight = 0,         type = "item",      image = "keya.png",                 unique = true,      useable = false,    shouldClose = false,   combinable = nil,   description = "Labkey A.."},

Weed Processing (Weed Lab)

If you want to use the script's own teleport system to go inside the weed lab then leave the EnableTp = true on line 24.

OR

If you want to use qb-smallresources default teleport instead of the scripts then go to qb-smallresource > config.lua and add the following lines below Config.Teleports

    --- Weedlab
    [1] = {
        [1] = {
            coords = vector4(1066.2, -3183.38, -39.16, 89.3),
            ["AllowVehicle"] = false,
            drawText = '[E] Exit Lab'
        },
        [2] = {
            coords = vector4(-66.95, -1312.37, 29.28, 180.95),
            ["AllowVehicle"] = false,
            drawText = '[E] Enter Lab'
        },

    },

Credits

ps-weedplanting's People

Contributors

3rrorcodes avatar complexza avatar flek26 avatar gitmocha avatar itzmuri avatar lenzh avatar lionh34rt avatar monkeywhisper avatar pushkart2 avatar xandrice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ps-weedplanting's Issues

check weed plant

every weed plant in the city when you 3rd eye it says check weed plant witch conflicts with other scripts what needs a 3rd eye action to do something with it

UI reports water and fertilizer above "threshold" the entire time, but health still goes down.

Health will slowly go down no matter what pretty much. Will go back up by a few % sometimes too.

--- Growing Related Settings
Shared.rayCastingDistance = 15.0 -- distance in meters
Shared.ClearOnStartup = true -- Clear dead plants on script start-up
Shared.ObjectZOffset = 0.0 -- Z-coord offset for WeedProps
Shared.FireTime = 10000

Shared.GrowTime = 60 -- Time in minutes for a plant to grow from 0 to 100
Shared.LoopUpdate = 15 -- Time in minutes to perform a loop update for water, nutrition, health, growth, etc.
Shared.WaterDecay = 2 -- Percent of water that decays every minute
Shared.FertilizerDecay = 2 -- Percent of fertilizers that decays every minute

Shared.FertilizerThreshold = 40
Shared.WaterThreshold = 40
Shared.HealthBaseDecay = {7, 10} -- Min/Max Amount of health decay when the plant is below the above thresholds for water and nutrition

Water & Feed

I can't feed & give water to the plants.

I got water_bottle in inventory & nothing happens..

Plant Sizes

The size of the plants doesnt update without a restart

Everything works decent expect

Everything but for deliveries you can't package at the npc no error call up so not sure the issue
also polyzones show during delivery and can't get them to shut off causes lag during deliveries with polyzone

Desktop Screenshot 2023 02 27 - 10 56 47 13

Desktop Screenshot 2023 02 27 - 10 53 58 44

Unable to destroy plants as active police

When I attempt to remove plants I get this error;

Invalid Lua type in __data handling line 417 in clientlua of this resource.

DB is connected and is saving plant meta so unsure what's causing this.

Planting on certain materials [Suggestion]

It should me nice to have so you only can plant weed on certain materials like (Grass, dirt, sand) etc,
Right now you can plant everywhere in (trashcans, house walls, benches) etc,

Planting Weed

When I go to plant the weed it never actually plants and instead gets frozen on my screen along with the draw text. I cant plant or cancel. This is using the latest version.

https://streamable.com/4h0abw

Using items

Sometimes when you use the items and get the textui and the plant prop and you are about to place it freezes and you cannot do anything

cant figaure out how to get into weedlab

im having an issue being able to figaure out how to get into the weed lab to process the branches, ive tried moving he bench and the target and prob doing it wrong as im still new to coding and development , but theres no code besides the props inside the interior for info about it. nothing for spawning into the lab to start the process, or leaving it.

Fix Verison Checker

[script:ps-weedplanti] Unable to determine current resource version for 'ps-weedplanting'

sv_processing.lua > ProcessBranch Event

Installed this script, added sql, allows you to plant, maintain and harvest. When u try to "ProcessBranch" it does the animation but doesn't do anything else. No errors thrown in console/f8.

I'm gonna go on a limb and assume it's this part 'item.info.health'. I don't see where it's grabbing info.health anywhere. Maybe blind but i don't think there is. This is the only thing i see that could cause this.

menu

when i 3rd eye it all i get is destroy or pick when its done not getting feed or water

Multiple plants

I keep getting multiple plants per seed. E.g If I plant 1x Female seed it plants 2-4 seeds then finishes all in the same location.

Not sure if it's just me I'm going to re download the script and reinstall.

Plants disappearing

Plant's disappear even on the latest version. Verified food and watering and nutrition is working but will leave the plant and come back or after a storm and the plants will be gone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.