Loving the script , this is exactly what I was looking for to use on my server ! One thing Im wondering about tho is the grow time. Ive been on stage 3 for about 15 mins now and I cant see anywhere in the script where it should take this long. Where should I look to adjust the grow time in between “tends” ? I know the config has things labeled pretty well but I cant match this time up with anything I see.
4 Likes
e[91mSCRIPT ERROR: @esx_uteknark /sv_uteknark.lua:102: attempt to compare number with nile[0m
any help ?
Demonen
November 11, 2019, 8:53pm
23
It’s trying to give you an item, but that item doesn’t exist in the database.
I’ll write in a check for that!
item ‘weed_pooch’ exist in database and it is the same item in config ass well so i don’t know
Demonen
November 11, 2019, 8:56pm
25
All the times are set in lib/growth.lua
Be careful modifying this file too much, as it can really mess things up
There is a setting in config.lua
to set a multiplier to just speed things up.
1 Like
even when I change an item to another it doesn’t work either
Demonen
November 11, 2019, 9:01pm
27
Ah! I found it!
Have a look:
end
local xPlayer = ESX.GetPlayerFromId(who)
if xPlayer == nil then
log("GiveItem: Failed to resolve xPlayer from", who)
return false
end
local itemspec = xPlayer.getInventoryItem(what)
if itemspec then
if not itemspec.limit or itemspec.limit == -1 or itemspec.count + count <= itemspec.limit then
xPlayer.addInventoryItem(what, count)
return true
else
return false
end
else
log("GiveItem: Failed to get item data for item", what)
return false
end
end
function makeToast(target, subject, message)
It’s checking the limit of the item, but you probably have the new ESX that has the breaking change to not have limits, but weight instead. I guess I’ll have to build in some check for that, too.
1 Like
Yes, I use the new system, as I will have more free time later, I will figure it out and let you know
Demonen
November 11, 2019, 9:21pm
29
Should be fixed in v1.1.0 that I just released.
That also has some pretty effects for when you destroy plants.
3 Likes
Wow did not expect this level of quality , serious props sir !
2 Likes
now everything works great script and thanks for sharing
1 Like
Demonen
November 11, 2019, 9:37pm
32
Aaaw, thanks guys, glad you like it!
2 Likes
Thank you for this awsome script !
Question : How do i convert to real time minutes ? I’m confused with this format ‘‘time = 960, – 960 minutes is 24 hours’’
Demonen
November 12, 2019, 11:28am
34
From the code:
local growthTime = (stageData.time * 60 * Config.TimeMultiplier)
It is real time minutes. 960 minutes is 16 hours, I just fucked up the comment.
1 Like
m0lartv
November 12, 2019, 2:45pm
36
Just a stupid question but I really don’t know the answer. What’s a Tend? Thx
Demonen
November 12, 2019, 3:11pm
37
Yoinked from a dictionary:
verb (used with object)
to attend to by work or services, care, etc.: to tend a fire.
to look after; watch over and care for; minister to or wait on with service: to tend the sick.
Nautical. to handle or attend to (a rope).
In the script it means “poke the damn plant in such a way as to make it grow and not die”
m0lartv
November 12, 2019, 3:17pm
38
Lol!!
You’re awesome man!! Thx for the explanation and an amazing script!! Cheers
3 Likes
Is there also an option for the police to remove the plants whenever they see them so it makes it harder for the “farmers” to make money out of it? Maybe it sounds like a stupid question xD
Is there a way to add a limit for planting, so players dont just spam them weeds hahah