Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. -- Verifie si le joueurs est dans un vehicule ou pas
  2. function IsInVehicle()
  3. local ply = PlayerPedId()
  4. if IsPedSittingInAnyVehicle(ply) then
  5. return true
  6. else
  7. return false
  8. end
  9. end
  10.  
  11. function recolte(currentVehicle, isGoodVehicle)
  12. if (PlayerData.job.name == 'police') then
  13. ESX.ShowNotification(_U('police_methylamine'))
  14. else
  15. if currentVehicle == 0 then
  16. ESX.ShowNotification(_U('need_vehicle'))
  17. return
  18. end
  19. if isGoodVehicle == false then
  20. ESX.ShowNotification(_U('bad_vehicle'))
  21. else
  22. if currentCharge >= 10000 then
  23. currentCharge = 10000
  24. ESX.ShowNotification(_U('full_vehicle'))
  25. Citizen.Wait(1000)
  26. ESX.ShowNotification(_U('full_vehicle_2'))
  27. Citizen.Wait(10000)
  28. ESX.ShowNotification(_U('full_vehicle_3'))
  29. else
  30. currentCharge = math.min(10000, currentCharge + 10)
  31. DecorSetInt(currentVehicle,'illegal_chargeMeth', currentCharge)
  32. ESX.ShowNotification(_U('filling_vehicle'))
  33. Citizen.Wait(100)
  34. end
  35. end
  36. end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement