Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. function drinkEnergy()
  2.  
  3. nothotDuration = 4
  4. duration = 4
  5. seconds = 4
  6. decimals = duration
  7.  
  8. addEventHandler('onClientRender',root,renderCircle)
  9.  
  10. textTakingOrDrinking = 'Пьём энергетик'
  11.  
  12.  
  13. setTimer( function()
  14.  
  15. removeEventHandler('onClientRender',root,renderCircle)
  16.  
  17. currentAngle = 0
  18. nothotDuration = 0
  19. duration = 0
  20.  
  21. end,duration*1100,1)
  22.  
  23.  
  24. --triggerClientEvent('giveHP',localPlayer,localPlayer)
  25.  
  26. end
  27.  
  28. --------------- Арифметический счётчик ---------------------------------------------------------------------------------------------------
  29.  
  30. setTimer( function()
  31. if duration ~= 0 and duration > 0 then
  32.  
  33. decimals = duration-0.1
  34. duration = duration-0.1
  35.  
  36.  
  37. if decimals <= 0.1 then
  38.  
  39. decimals = 0.1
  40.  
  41. end
  42.  
  43. if decimals <= 0 then
  44.  
  45. decimals = 0
  46.  
  47.  
  48. end
  49.  
  50. currentAngle = currentAngle+maxAngle/nothotDuration/10
  51.  
  52.  
  53. end
  54.  
  55. end,100,0)
  56.  
  57.  
  58. --------------- Арифметический счётчик ---------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement