Hey bro, how to fix “you can’t hold more weed” when I already harvest?
For people who uses new esx with weight
OLD:
function GiveItem(who, what, count)
count = count or 1
if ESX == nil then
log("GiveItem: No ESX Object!")
return false
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
NEW:
function GiveItem(who, what, count)
count = count or 1
if ESX == nil then
log("GiveItem: No ESX Object!")
return false
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 xPlayer.canCarryItem(what, count) 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
i cant figure out why, when i use giveitem command, it tells me invalid item and the sever states that it cannot find the weed seeds or weed pooch.
Can i get a link?
Any info how to make this part ( burn ) with item instead of a button?
when they through a specific item then the plant gets burned
RegisterNetEvent(‘esx_uteknark:pyromaniac’)
AddEventHandler (‘esx_uteknark:pyromaniac’,function(location)
if Config.Burn.Enabled then
local myLocation = GetEntityCoords(PlayerPedId())
if not location then
location = myLocation + vector3(0,0,-1) – Because the ped location is one meter off the ground.
end
if #(location - myLocation) <= Config.Distance.Draw then
Citizen.CreateThread(function()
local begin = GetGameTimer()
if not HasNamedPtfxAssetLoaded(Config.Burn.Effect) then
RequestNamedPtfxAsset(Config.Burn.Collection)
while not HasNamedPtfxAssetLoaded(Config.Burn.Collection) and GetGameTimer() <= begin + Config.Burn.Duration do
Citizen.Wait(0)
end
if not HasNamedPtfxAssetLoaded(Config.Burn.Collection) then
print("UteKnark failed to load particle effects asset "…Config.Burn.Collection)
end
end
UseParticleFxAsset(Config.Burn.Collection)
local handle = StartParticleFxLoopedAtCoord(Config.Burn.Effect, location + Config.Burn.Offset, Config.Burn.Rotation, Config.Burn.Scale * 1.0, false, false, false)
while GetGameTimer() <= begin + Config.Burn.Duration do
Citizen.Wait(0)
end
StopParticleFxLooped(handle, 0)
RemoveNamedPtfxAsset(Config.Burn.Collection)
end)
end
end
end)
i have this issue:
[ script:esx_uteknark] SCRIPT ERROR: @esx_uteknark/lib/cropstate.lua:46: Object inserted by :insert does not fit in node at level 0
and it happens from nowhere the script was working all the time and then from one day to another this happens the plants disapears after a restart from the server I cant explain but they are still in the database can someone help me ?
If I move away from the plant and then go back to it, it does not appear. What can I do to make the plant appear? I have set the draw range at 150.
same here … i updated artifacts and got same error now …
is there a way to add more strains to the config
make that you can fertilize the plants with firetrucks with the nozzle on the roof!
its barely letting me plant i can;t find any ground good enough got a decent location you could share ?
Hey man, great script! Im wondering if it would be possible to implement a timer in the HelpNotification, when you walk upto the plant, when the next stage starts? If anyone has an idea, please hmu or answer!
Thank you very much.
so i changed the model to have the pot plant in an actual pot but i cant get the script to allow the plant to be put anywhere any help on this?
Did you ever figure this out? I’m trying to find it but not sure what to look for.
Hey buddy! I use the script today and it wont work for me. I cant select the “use” button for the seed item because it dont show the damed button! xD
Any help?
following! having the same issue
Hey there, it dont remove fertilizer when fertilized the plant, what can i do?
Just to formally let everyone know, I have abandoned this resource and not updated it in a very long time.
You’re free to use it as is, or fork it on GitHub to modify as you like (just follow the MIT license!)
I encourage you to help eachother out getting it running right, but please don’t come to me with your problems, as I won’t read it. When I logged in here today it was the first time in over a year!
@Demonen Hi, I have a problame. I planted my drug but it doesn’t draw water from my inventory. Second problame, I try to harvest but i wasn’t get the seed and weed but it’s in the database and and in my inventory there was only water.
