Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. local veh = getPedOccupiedVehicle (getLocalPlayer())
  2. if veh then
  3. local maxfuel = getElementData(veh,"maxfuel")
  4. local fuel = getElementData(getElementData(veh,"parent"),"fuel")
  5. local needengine = getElementData(veh,"needengines")
  6. local needtires = getElementData(veh,"needtires")
  7. local needparts = getElementData(veh,"needparts")
  8. local car_hp = getElementHealth(getPedOccupiedVehicle (getLocalPlayer()))
  9. local engine = getElementData(getElementData(veh,"parent"),"Äâčăŕňĺëü_inVehicle") or 0
  10. local tires = getElementData(getElementData(veh,"parent"),"Ęîëĺńî_inVehicle") or 0
  11. local parts = getElementData(getElementData(veh,"parent"),"Parts_inVehicle") or 0
  12. local offset = dxGetFontHeight(1.02,"default-bold")
  13. if engine == needengine then
  14. r,g,b = 84, 159, 40
  15. else
  16. r,g,b = 235, 36, 36
  17. end
  18. dxDrawImage(screenWidth * 0.041, screenHeight * 0.24, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/1.png", 0, 0, 0, tocolor(r,g,b))
  19. if tires == needtires then
  20. r,g,b = 84, 159, 40
  21. else
  22. r,g,b = 235, 36, 36
  23. end
  24. dxDrawImage(screenWidth * 0.041, screenHeight * 0.275, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/2.png", 0, 0, 0, tocolor(r,g,b))
  25. dxDrawText (tires.."/"..needtires.."",screenWidth*0.043 , screenHeight*0.3,screenWidth*0.003 , screenHeight*0.003,tocolor ( 85, 107, 47, 220 ), 1.02, "default-bold" )
  26. if parts == needparts then
  27. r,g,b = 84, 159, 40
  28. else
  29. r,g,b = 235, 36, 36
  30. end
  31. dxDrawImage(screenWidth * 0.041, screenHeight * 0.314, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/3.png", 0, 0, 0, tocolor(r,g,b))
  32. if car_hp >= 700 and car_hp <=1000 then
  33. r,g,b = 84, 159, 40
  34. end
  35. if car_hp >= 400 and car_hp <=699 then
  36. r,g,b = 163, 148, 21
  37. end
  38. if car_hp >= 100 and car_hp <=399 then
  39. r,g,b = 168, 50, 2
  40. end
  41. if car_hp >= 0 and car_hp <= 100 then
  42. r,g,b = 235, 36, 36
  43. end
  44. dxDrawImage(screenWidth * 0.041, screenHeight * 0.354, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/4.png", 0, 0, 0, tocolor(r,g,b))
  45. if fuel <= 10 then
  46. dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/010.png" )
  47. elseif fuel <= 20 then
  48. dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/1020.png" )
  49. elseif fuel <= 30 then
  50. dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/2030.png" )
  51. elseif fuel <= 40 then
  52. dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/3040.png" )
  53. elseif fuel <= 50 then
  54. dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/4050.png" )
  55. elseif fuel <= 70 then
  56. dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/5070.png" )
  57. elseif fuel >= 70 then
  58. dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/70100.png" )
  59. end
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement