Jetzt sieht es aktuell so aus:
local function HarvestKoda(source)
SetTimeout(Config.TimeToFarm, function()
if PlayersHarvestingKoda[source] then
local xPlayer = ESX.GetPlayerFromId(source)
local koda = xPlayer.getInventoryItem('apfel')
if koda.limit ~= -1 and koda.count >= koda.limit then
TriggerClientEvent('esx:showNotification', source, _U('taschen_voll'))
else
if targetXPlayer.canCarryItem(apfel, 2) then
targetXPlayer.addInventoryItem (apfel, 2)
HarvestKoda(source)
end
end
end)
end