Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 KB | None | 0 0
  1. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2. {
  3. if(PlayerInfo[playerid][pVozacka] == 0)
  4. {
  5. SendClientMessage(playerid, -1, "** Ti nemas vozacku dozvolu, pazi se policije! **");
  6. }
  7. if(vehicleid == vozilazapolaganje[1])
  8. {
  9. if(PlayerInfo[playerid][pPolaganje] == 1)
  10. {
  11. ccp[playerid] = 1;
  12. SendClientMessage(playerid, -1, ""COLOR_WHITE"[AS]"COLOR_RED" Krenuli ste sa polaganjem pratite markere. Pazite da neostetite vozilo!");
  13. checkpoint[1] = SetPlayerCheckpoint(playerid, 2083.2600,-1910.3564,13.3828, 5);
  14. }
  15. return 1;
  16. }
  17. if(vehicleid == vozilazapolaganje[2])
  18. {
  19. if(PlayerInfo[playerid][pPolaganje] == 1)
  20. {
  21. ccp[playerid] = 1;
  22. SendClientMessage(playerid, -1, ""COLOR_WHITE"[AS]"COLOR_RED" Krenuli ste sa polaganjem pratite markere. Pazite da neostetite vozilo!");
  23. checkpoint[1] = SetPlayerCheckpoint(playerid, 2083.2600,-1910.3564,13.3828, 5);
  24. }
  25. return 1;
  26. }
  27. if(vehicleid == vozilazapolaganje[3])
  28. {
  29. if(PlayerInfo[playerid][pPolaganje] == 1)
  30. {
  31. ccp[playerid] = 1;
  32. SendClientMessage(playerid, -1, ""COLOR_WHITE"[AS]"COLOR_RED" Krenuli ste sa polaganjem pratite markere. Pazite da neostetite vozilo!");
  33. checkpoint[1] = SetPlayerCheckpoint(playerid, 2083.2600,-1910.3564,13.3828, 5);
  34. }
  35. return 1;
  36. }
  37. if(vehicleid == vozilazapolaganje[4])
  38. {
  39. if(PlayerInfo[playerid][pPolaganje] == 1)
  40. {
  41. ccp[playerid] = 1;
  42. SendClientMessage(playerid, -1, ""COLOR_WHITE"[AS]"COLOR_RED" Krenuli ste sa polaganjem pratite markere. Pazite da neostetite vozilo!");
  43. checkpoint[1] = SetPlayerCheckpoint(playerid, 2083.2600,-1910.3564,13.3828, 5);
  44. }
  45. return 1;
  46. }
  47. if(vehicleid == vozilazapolaganje[5])
  48. {
  49. if(PlayerInfo[playerid][pPolaganje] == 1)
  50. {
  51. ccp[playerid] = 1;
  52. SendClientMessage(playerid, -1, ""COLOR_WHITE"[AS]"COLOR_RED" Krenuli ste sa polaganjem pratite markere. Pazite da neostetite vozilo!");
  53. checkpoint[1] = SetPlayerCheckpoint(playerid, 2083.2600,-1910.3564,13.3828, 5);
  54. }
  55. return 1;
  56. }
  57. if(vehicleid == vozilazapolaganje[6])
  58. {
  59. if(PlayerInfo[playerid][pPolaganje] == 1)
  60. {
  61. ccp[playerid] = 1;
  62. SendClientMessage(playerid, -1, ""COLOR_WHITE"[AS]"COLOR_RED" Krenuli ste sa polaganjem pratite markere. Pazite da neostetite vozilo!");
  63. checkpoint[1] = SetPlayerCheckpoint(playerid, 2083.2600,-1910.3564,13.3828, 5);
  64. }
  65. return 1;
  66. }
  67. return 1;
  68. }
  69.  
  70. public OnPlayerEnterCheckpoint(playerid)
  71. {
  72. if(ccp[playerid] == 1)
  73. {
  74. ccp[playerid] = 2;
  75. DisablePlayerCheckpoint(playerid);
  76. SetPlayerCheckpoint(playerid, 2084.4517,-1815.8667,13.3828, 5);
  77. }
  78. if(ccp[playerid] == 2)
  79. {
  80. ccp[playerid] = 3;
  81. DisablePlayerCheckpoint(playerid);
  82. SetPlayerCheckpoint(playerid, 2084.4517,-1815.8667,13.3828, 5);
  83. }
  84. if(ccp[playerid] == 3)
  85. {
  86. ccp[playerid] = 4;
  87. DisablePlayerCheckpoint(playerid);
  88. SetPlayerCheckpoint(playerid, 2107.7744,-1713.3893,13.3892, 5);
  89. }
  90. if(ccp[playerid] == 4)
  91. {
  92. ccp[playerid] = 5;
  93. DisablePlayerCheckpoint(playerid);
  94. SetPlayerCheckpoint(playerid, 2114.9268,-1611.1447,23.9743, 5);
  95. }
  96. if(ccp[playerid] == 5)
  97. {
  98. ccp[playerid] = 6;
  99. DisablePlayerCheckpoint(playerid);
  100. SetPlayerCheckpoint(playerid, 2115.7139,-1482.5104,23.8069, 5);
  101. }
  102. if(ccp[playerid] == 6)
  103. {
  104. ccp[playerid] = 7;
  105. DisablePlayerCheckpoint(playerid);
  106. SetPlayerCheckpoint(playerid, 2055.8904,-1457.4177,20.1353, 5);
  107. }
  108. if(ccp[playerid] == 7)
  109. {
  110. ccp[playerid] = 8;
  111. DisablePlayerCheckpoint(playerid);
  112. SetPlayerCheckpoint(playerid, 1940.8206,-1459.9934,13.3828, 5);
  113. }
  114. if(ccp[playerid] == 8)
  115. {
  116. ccp[playerid] = 9;
  117. DisablePlayerCheckpoint(playerid);
  118. SetPlayerCheckpoint(playerid, 1846.2623,-1495.7784,13.3612, 5);
  119. }
  120. if(ccp[playerid] == 9)
  121. {
  122. ccp[playerid] = 10;
  123. DisablePlayerCheckpoint(playerid);
  124. SetPlayerCheckpoint(playerid, 1819.0737,-1606.5913,13.3778, 5);
  125. }
  126. if(ccp[playerid] == 10)
  127. {
  128. ccp[playerid] = 11;
  129. DisablePlayerCheckpoint(playerid);
  130. SetPlayerCheckpoint(playerid, 1820.1173,-1727.2739,13.3828, 5);
  131. }
  132. if(ccp[playerid] == 11)
  133. {
  134. ccp[playerid] = 12;
  135. DisablePlayerCheckpoint(playerid);
  136. SetPlayerCheckpoint(playerid, 2074.3882,-1910.6429,13.5469, 5);
  137. SendClientMessage(playerid, -1, ""COLOR_RED"[AS]"COLOR_WHITE" Sada otidjite do zadnjeg markera i sacekajte rezultate testa.");
  138. }
  139. if(ccp[playerid] == 13)
  140. {
  141. DisablePlayerCheckpoint(playerid);
  142. new Float:health;
  143. new veh = GetPlayerVehicleID(playerid);
  144. GetVehicleHealth(veh, health);
  145. if(health < 700)
  146. {
  147. SendClientMessage(playerid, -1, ""COLOR_RED"[AS]"COLOR_WHITE" Niste polozili vozacki ispit jer vam je vozilo osteceno, pokusajte ponovo kasnije.");
  148. return 1;
  149. }
  150. else
  151. {
  152. new sarma = GetPlayerVehicleID(playerid);
  153. SetVehicleToRespawn(sarma);
  154. PlayerInfo[playerid][pVozacka] = 1;
  155. SendClientMessage(playerid, -1, ""COLOR_RED"[AS]"COLOR_WHITE" Polozili ste vozacki ispit, cestitamo! Vozite oprezno.");
  156. }
  157. }
  158. return 1;
  159. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement