Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function HarvestCoke(source)
- if CopsConnected < Config.RequiredCopsCoke then
- TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
- return
- end
- SetTimeout(5000, function()
- if PlayersHarvestingCoke[source] == true then
- local xPlayer = ESX.GetPlayerFromId(source)
- local coke = xPlayer.getInventoryItem('coke')
- if coke.limit ~= -1 and coke.count >= coke.limit then
- TriggerClientEvent('esx:showNotification', source, _U('inv_full_coke'))
- else
- xPlayer.addInventoryItem('coke', 1)
- HarvestCoke(source)
- end
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement