Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. local function HarvestCoke(source)
  2.  
  3. if CopsConnected < Config.RequiredCopsCoke then
  4. TriggerClientEvent('esx:showNotification', source, _U('act_imp_police') .. CopsConnected .. '/' .. Config.RequiredCopsCoke)
  5. return
  6. end
  7.  
  8. SetTimeout(5000, function()
  9.  
  10. if PlayersHarvestingCoke[source] == true then
  11.  
  12. local xPlayer = ESX.GetPlayerFromId(source)
  13.  
  14. local coke = xPlayer.getInventoryItem('coke')
  15.  
  16. if coke.limit ~= -1 and coke.count >= coke.limit then
  17. TriggerClientEvent('esx:showNotification', source, _U('inv_full_coke'))
  18. else
  19. xPlayer.addInventoryItem('coke', 1)
  20. HarvestCoke(source)
  21. end
  22.  
  23. end
  24. end)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement