MistarA

Untitled

Aug 13th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. new Text:SpeedBox[MAX_PLAYERS];
  2. new Speedo[MAX_PLAYERS];
  3.  
  4.  
  5.  
  6. new str[128], fuelbar[128];
  7. if(speed < 151)
  8. {
  9. fuel /= 10;
  10. if(fuel >= 1)
  11. {
  12. format(fuelbar, sizeof(fuelbar), "~l~I~w~II~r~IIIIIII~l~I");
  13. }
  14. else
  15. {
  16. format(fuelbar, sizeof(fuelbar), "~l~I~r~IIIIIIIIII~l~I");
  17. }
  18. if(fuel >= 3)
  19. {
  20. format(fuelbar, sizeof(fuelbar), "~l~I~w~III~r~IIIII~l~I");
  21. }
  22. if(fuel >= 5)
  23. {
  24. format(fuelbar, sizeof(fuelbar), "~l~I~w~IIII~r~IIIII~l~I");
  25. }
  26. if(fuel >= 7)
  27. {
  28. format(fuelbar, sizeof(fuelbar), "~l~I~w~IIIIII~r~III~l~I");
  29. }
  30. if(fuel >= 9)
  31. {
  32. format(fuelbar, sizeof(fuelbar), "~l~I~w~IIIIIIIIIII~l~I");
  33. }
  34.  
  35.  
  36. if(speed > 65 && GDL_Test[playerid] > 0)
  37. {
  38. FailDrivingTest(playerid, "Viteza prea mare.");
  39. format(str, sizeof(str), "Speed:~r~ %d ~w~MPH~n~Fuel: %s", speed, fuelbar);
  40. }
  41. if(speed > 60)
  42. {
  43. format(str, sizeof(str), "~b~Speed: ~r~%d KM/H~n~~b~Fuel: ~w~%s", speed, fuelbar);
  44. }
  45. else
  46. {
  47. format(str, sizeof(str), "~b~Speed: ~w~%d KM/H~n~~b~Fuel: ~w~%s", speed, fuelbar);
  48. }
  49. if(Engine[GetPlayerVehicleID(playerid)] == 0)
  50. {
  51. KillTimer(Vehicles[GetPlayerVehicleID(playerid)][FuelTimer]);
  52. }
  53. TextDrawSetString(SpeedBox[playerid], str);
  54. TextDrawShowForPlayer(playerid, SpeedBox[playerid]);
  55. }
  56.  
  57. SpeedBox[i] = TextDrawCreate(550, 370, "MPH:");
  58. TextDrawLetterSize(SpeedBox[i], 0.309000, 1.417481);
  59. TextDrawTextSize(SpeedBox[i], -114.333312, 100);
  60. TextDrawAlignment(SpeedBox[i], 2);
  61. TextDrawColor(SpeedBox[i], -1);
  62. TextDrawUseBox(SpeedBox[i], false);
  63. TextDrawBoxColor(SpeedBox[i], 51);
  64. TextDrawSetShadow(SpeedBox[i], 0);
  65. TextDrawSetOutline(SpeedBox[i], -1);
  66. TextDrawBackgroundColor(SpeedBox[i], 255);
  67. TextDrawFont(SpeedBox[i], 2);
  68. TextDrawSetProportional(SpeedBox[i], 1);
Advertisement
Add Comment
Please, Sign In to add comment