MistarA

Untitled

Aug 15th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.89 KB | None | 0 0
  1. for(new h = 0; h < sizeof(DynamicCars); h++)
  2. {
  3. if(DynamicCars[veh][CarType] == 69)
  4. {
  5. if(TakingDrivingTest[playerid] == 1)
  6. {
  7. if(PlayerToPoint(5.0,playerid,1210.4828,-1841.8555,13.3828) && DrivingTestStep[playerid] == 1)
  8. {
  9. DrivingTestStep[playerid] = 2;
  10. SetPlayerCheckpoint(playerid, 1179.7932,-1718.5259,13.5700, 5.0);
  11. }
  12. else if(PlayerToPoint(5.0,playerid,1179.7932,-1718.5259,13.5700) && DrivingTestStep[playerid] == 2)
  13. {
  14. DrivingTestStep[playerid] = 3;
  15. SetPlayerCheckpoint(playerid, 1048.8259,-1709.8258,13.3828, 5.0);
  16. }
  17. else if(PlayerToPoint(5.0,playerid,1048.8259,-1709.8258,13.3828) && DrivingTestStep[playerid] == 3)
  18. {
  19. DrivingTestStep[playerid] = 4;
  20. SetPlayerCheckpoint(playerid, 1030.9001,-1791.4723,13.7039, 5.0);
  21. }
  22. else if(PlayerToPoint(5.0,playerid,1030.9001,-1791.4723,13.7039) && DrivingTestStep[playerid] == 4)
  23. {
  24. DrivingTestStep[playerid] = 5;
  25. SetPlayerCheckpoint(playerid, 876.9290,-1768.1295,13.3828, 5.0);
  26. }
  27. else if(PlayerToPoint(5.0,playerid,876.9290,-1768.1295,13.3828) && DrivingTestStep[playerid] == 5)
  28. {
  29. DrivingTestStep[playerid] = 6;
  30. SetPlayerCheckpoint(playerid, 636.0714,-1725.2800,13.9202, 5.0);
  31. }
  32. else if(PlayerToPoint(5.0,playerid,636.0714,-1725.2800,13.9202) && DrivingTestStep[playerid] == 6)
  33. {
  34. DrivingTestStep[playerid] = 7;
  35. SetPlayerCheckpoint(playerid, 640.0871,-1528.6864,15.0002, 5.0);
  36. }
  37. else if(PlayerToPoint(5.0,playerid,640.0871,-1528.6864,15.0002) && DrivingTestStep[playerid] == 7)
  38. {
  39. DrivingTestStep[playerid] = 8;
  40. SetPlayerCheckpoint(playerid, 639.6245,-1413.1931,13.4582, 5.0);
  41. }
  42. else if(PlayerToPoint(5.0,playerid,639.6245,-1413.1931,13.4582) && DrivingTestStep[playerid] == 8)
  43. {
  44. DrivingTestStep[playerid] = 9;
  45. SetPlayerCheckpoint(playerid, 792.8707,-1411.4475,13.3976, 5.0);
  46. }
  47. else if(PlayerToPoint(5.0,playerid,792.8707,-1411.4475,13.3976) && DrivingTestStep[playerid] == 9)
  48. {
  49. DrivingTestStep[playerid] = 10;
  50. SetPlayerCheckpoint(playerid, 769.1151,-1576.3108,13.3867, 5.0);
  51. }
  52. else if(PlayerToPoint(5.0,playerid,769.1151,-1576.3108,13.3867) && DrivingTestStep[playerid] == 10)
  53. {
  54. DrivingTestStep[playerid] = 11;
  55. SetPlayerCheckpoint(playerid, 825.0438,-1605.5065,13.3828, 5.0);
  56. }
  57. else if(PlayerToPoint(5.0,playerid,825.0438,-1605.5065,13.3828) && DrivingTestStep[playerid] == 11)
  58. {
  59. DrivingTestStep[playerid] = 12;
  60. SetPlayerCheckpoint(playerid, 858.5005,-1596.6033,13.3906, 5.0);
  61. }
  62. else if(PlayerToPoint(5.0,playerid,858.5005,-1596.6033,13.3906) && DrivingTestStep[playerid] == 12)
  63. {
  64. DrivingTestStep[playerid] = 13;
  65. SetPlayerCheckpoint(playerid, 948.2869,-1574.6379,13.3828, 5.0);
  66. }
  67. else if(PlayerToPoint(5.0,playerid,948.2869,-1574.6379,13.3828) && DrivingTestStep[playerid] == 13)
  68. {
  69. DrivingTestStep[playerid] = 14;
  70. SetPlayerCheckpoint(playerid, 1033.9424,-1702.3530,13.3906, 5.0);
  71. }
  72. else if(PlayerToPoint(5.0,playerid,1033.9424,-1702.3530,13.3906) && DrivingTestStep[playerid] == 14)
  73. {
  74. DrivingTestStep[playerid] = 15;
  75. SetPlayerCheckpoint(playerid, 1070.5059,-1714.9296,13.3828, 5.0);
  76. }
  77. else if(PlayerToPoint(5.0,playerid,1070.5059,-1714.9296,13.3828) && DrivingTestStep[playerid] == 15)
  78. {
  79. DrivingTestStep[playerid] = 16;
  80. SetPlayerCheckpoint(playerid, 1171.3979,-1718.9802,13.6808, 5.0);
  81. }
  82. else if(PlayerToPoint(5.0,playerid,1171.3979,-1718.9802,13.6808) && DrivingTestStep[playerid] == 16)
  83. {
  84. DrivingTestStep[playerid] = 17;
  85. SetPlayerCheckpoint(playerid, 1173.2983,-1841.9572,13.4079, 5.0);
  86. }
  87. else if(PlayerToPoint(5.0,playerid,1173.2983,-1841.9572,13.4079) && DrivingTestStep[playerid] == 17)
  88. {
  89. DrivingTestStep[playerid] = 18;
  90. SetPlayerCheckpoint(playerid, 1264.3164,-1852.0735,13.3828, 5.0);
  91. }
  92. else if(PlayerToPoint(5.0,playerid,1264.3164,-1852.0735,13.3828) && DrivingTestStep[playerid] == 18)
  93. {
  94. DrivingTestStep[playerid] = 19;
  95. SetPlayerCheckpoint(playerid, 1223.6658,-1826.8866,13.4099, 5.0);
  96. }
  97. else if(PlayerToPoint(5.0,playerid,1223.6658,-1826.8866,13.4099) && DrivingTestStep[playerid] == 19)
  98. {
  99. DrivingTestStep[playerid] = 20;
  100. SetPlayerCheckpoint(playerid, 1223.6658,-1826.8866,13.4099, 5.0);
  101. }
  102. else if(PlayerToPoint(5.0,playerid,1223.6658,-1826.8866,13.4099) && DrivingTestStep[playerid] == 20)
  103. {
  104. new Float:health;
  105. veh = GetPlayerVehicleID(playerid);
  106. GetVehicleHealth(veh, health);
  107.  
  108. if(health >= 950.0)
  109. {
  110. GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
  111. if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
  112. SendClientMessage(playerid, COLOR_GREEN, "Felicitari! Ai trecut testul. Acum ai o licenta valida pentru condus. Ai fost taxat cu 50$.");
  113. GameTextForPlayer(playerid, "~g~Trecut", 3000, 1);
  114. PlayerInfo[playerid][pCarLic] = 1;
  115. EngineStatus[veh] = 0;
  116. SetVehicleToRespawn(veh);
  117. EngineStatus[veh] = 0;
  118. TakingDrivingTest[playerid] = 0;
  119. DisablePlayerCheckpoint(playerid);
  120. ActiveCP[playerid] = 0;
  121. GivePlayerCash(playerid,-50);
  122. GivePlayerCash(playerid,-Businesses[12][EntranceCost]);
  123. Businesses[12][Till] += Businesses[12][EntranceCost];
  124. }
  125. else
  126. {
  127. GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
  128. if(engine == VEHICLE_PARAMS_ON) { SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }
  129. SendClientMessage(playerid, COLOR_LIGHTRED, "Ne pare rau dar nu ai trecut testul. Incearca data viitoare");
  130. SendClientMessage(playerid, COLOR_LIGHTRED, "Ai fost taxat cu 100$ pentru examen si reparatiile masinii.");
  131. GameTextForPlayer(playerid, "~r~Esuare", 3000, 1);
  132. EngineStatus[veh] = 0;
  133. SetVehicleToRespawn(veh);
  134. EngineStatus[veh] = 0;
  135. TakingDrivingTest[playerid] = 0;
  136. DisablePlayerCheckpoint(playerid);
  137. ActiveCP[playerid] = 0;
  138. GivePlayerCash(playerid,-100);
  139. Businesses[12][Till] += 50;
  140. }
  141. DrivingTestStep[playerid] = 0;
  142. ActiveCP[playerid] = 0;
  143. DMVTest[playerid] = 0;
  144. }
  145. return 1;
  146. }
  147. }
  148. }
  149. return 1;
  150. }
Advertisement
Add Comment
Please, Sign In to add comment