hi guys, im semi new to all this and im trying to figure out how to input a cost factor into the harvesting of the drugs? ive found the code but not sure where to go from there?
any help would be great! Thanks.
local function HarvestWeed(source)
if CopsConnected < Config.RequiredCopsWeed then
TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsWeed)
return
end
SetTimeout(5000, function()
if PlayersHarvestingWeed[source] == true then
local xPlayer = ESX.GetPlayerFromId(source)
local weed = xPlayer.getInventoryItem('weed')
if weed.limit ~= -1 and weed.count >= weed.limit then
TriggerClientEvent('esx:showNotification', source, _U('inv_full_weed'))
else
xPlayer.addInventoryItem('weed', 1)
HarvestWeed(source)
end
end
end)
end