[Release] [ESX] UteKnark - Grow weed outdoors [Abandoned]

Hey Demonen
I really like your script - Just have a question though - As im working with trying to improve another script with setting the playerped heading towards a bin. I just can’t get it to work proberly, and can’t figure out how you did it proberly with the heading towards plants when tending.

I use the GetHeadingFromPoints function, then I set the heading of the player ped.
It takes vector2 or vector3 points, returns a float worldspace degrees heading. You want the player ped coords to be point a, and whatever you want to face’s coords as b.

Best of luck.

hi i notice plants get to stage 4 and they remove from the db for some reason

Right away at stage 4?!
Did you modify anything? That’s not part of the script.
It’s supposed to remove plants that are not tended/harvested in time, though.

how long do you have after they are not tended 2? before they remove

At stage 2, you have 20 minutes, though it’s adjusted a little with the soil quality.

where could i adjust that? id rather give like 2 hours so they have a window

All these times are adjusted in lib/growth.lua

Hello! Thanks for the contribution, would it be possible to modify your script to be able to plant indoors and ymaps? when I try to plant inside it tells me that there is not enough light. sorry for my English

and if possible in which file should I do it? i tried to delete the debug.lua event but i am new to this and learn by trying

I’m sorry, but teaching you to code is outside the scope of support for this resource.

Planting indoors is the exact opposite of what this resource is built to do, so that’s a major modification.
I guess you could add the floor material to the Soil and lower the Distance.Above in config.cfg to allow for planting indoors? It’ll work the same as planting outdoors, and probably be horribly ugly, but you are free to do that if you want.

Note that having modified things, like “delete the debug.lua event”, you’ve changed the script in ways that will make it impossible for me to give you any assistance. I have no idea what you might have broken.

1 Like

thanks for the reply! The purpose that I want to achieve is that each player can plant on the terrace of his house or in a conditioned room, I am completely new to this and my way of learning is based on error, that’s why I am trying things but thank you very much for your advice I will try the way you told me


thanks for the script is perfect for my server you are very good programmer

Thank you!

can someone send me the item because i dont know how to make it thanks!!!

What do you mean “send you the item”?
Do you mean an SQL file to insert the needed rows in your database, or what?

1 Like

thats the growing times where can iadjust it deleting it from db when not attended for 20 minutes

All the growth stuff is in that file. The interactive stages are where you tend or harvest, the non-interactive are where it grows on it’s own.

yes
please

I’m sorry, that’s a bit out-of-scope here. I don’t know what version of ESX you’re running or anything.
Just look at the items already in your database, and make more like that.
The item names can be configured in config.lua