I am releasing this and a couple of scripts I developed for K33NRP, a community I am no longer affiliated with and felt the release of some of my works would benefit some of the ESX servers out there.
This script deviates from the standard stand in a coordinate marker and instead opts for the use of a prop cache to derive locations for picking weed. The code is commented and easy to pick apart for those who would like to either re-use or re-iterate it.
I will not be offering direct support for this script however I will do my best to reply at the earliest convenience on this thread.
Is the plants already planted and you can just go and get the weed/joints or do you have the planting process in there aswell? Will test this tomorrow!
It just checks for the prop, gets closest distance to player and draws the text to interact. It’s quite simple, it uses citizen wait for the the delay before it can be picked again. There is no planting involved. Enjoy!
If you want the weed effects to smoke/interact than yes, you can use ESX drugs, however comment out the weed location markers as you wont need them (unless you absolutely want them).
If you want it to harvest weed under every attempt check the server side file and the command local luck = math.random(1, 3) and change it to local luck = math.random(1, 1)
good script BUT! It’s going over the limit of that said item. What i mean is, in the DB i have it that you can hold 20 only, and you can keep farming infinitly… Any fix>?