Guest User

Untitled

a guest
Jul 22nd, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.29 KB | None | 0 0
  1.  
  2. public OnPlayerTimer()
  3. {
  4. new string[128], vehicleid;
  5.  
  6. for(new i=0;i<GetMaxPlayers();i++)
  7. {
  8. if(IsPlayerConnected(i))
  9. {
  10. if(GetPlayerVirtualWorld(i) == 0 && GetPlayerInterior(i) == 0)
  11. {
  12. new Float:xx, Float:yy, Float:zz;
  13. GetPlayerPos(i, xx, yy, zz);
  14. if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000)){ // Los Santos
  15. SetPlayerWeather(i, currentWeather[0]);
  16. }
  17. if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000)){ // San Fierro
  18. SetPlayerWeather(i, currentWeather[1]);
  19. }
  20. if((xx > -992.5172 && xx< 4000.0000) && (yy < 4000.0000 && yy > 528.0000)){ // Las Venturas
  21. SetPlayerWeather(i, currentWeather[2]);
  22. }
  23. }else
  24. {
  25. SetPlayerWeather(i, 2);
  26. }
  27. if(Spieler[i][pLoggedIn])
  28. {
  29. if(Spieler[i][pBusTime] > 1)
  30. {
  31. if(GetPlayerCheckpointType(i) == CP_TYPE_BUS)
  32. {
  33. if(IsVehicleABus(vehicleid))
  34. {
  35. if(IsPlayerInCheckpoint(i))
  36. {
  37. Spieler[i][pBusTime] --;
  38. format(string, sizeof(string), "~w~Haltestelle..~b~%d", Spieler[i][pBusTime]);
  39. GameTextForPlayer(i, string, 1200, 5);
  40. ShowBusTextDraw(i);
  41. }
  42. }
  43. else
  44. {
  45. Spieler[i][pBusTime] = 0;
  46. HideBusTextDraw(i);
  47. SendClientMessage(i, COLOR_GREY, "** Der Countdown wurde abgebrochen!");
  48. }
  49. }
  50. }
  51. else
  52. {
  53. if(GetPlayerCheckpointType(i) == CP_TYPE_BUS)
  54. {
  55. if(IsVehicleABus(vehicleid))
  56. {
  57. if(IsPlayerInCheckpoint(i))
  58. {
  59. switch(GetPlayerCheckpointID(i))
  60. {
  61. // Linie 1
  62. case CP_BUSFAHRER_LINIE_1_1:{SetPlayerCheckpointEx(i, 1481.5775,-1730.3295,12.9539, 3.0, CP_BUSFAHRER_LINIE_1_2, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Stadthalle"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i); Spieler[i][pBusStamp] = gettime();}
  63. case CP_BUSFAHRER_LINIE_1_2:{SetPlayerCheckpointEx(i, 1437.1228,-1031.9480,23.2275, 3.0, CP_BUSFAHRER_LINIE_1_3, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Los Santos Bank"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  64. case CP_BUSFAHRER_LINIE_1_3:{SetPlayerCheckpointEx(i, 1195.7300,-935.7947,42.3151, 3.0, CP_BUSFAHRER_LINIE_1_4, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Burger Shot North"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  65. case CP_BUSFAHRER_LINIE_1_4:{SetPlayerCheckpointEx(i, 534.6187,-1243.9463,16.0791, 3.0, CP_BUSFAHRER_LINIE_1_5, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Rodeo (A)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  66. case CP_BUSFAHRER_LINIE_1_5:{SetPlayerCheckpointEx(i, 166.8460,-1524.6187,11.7255, 3.0, CP_BUSFAHRER_LINIE_1_6, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Rodeo (B)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  67. case CP_BUSFAHRER_LINIE_1_6:{SetPlayerCheckpointEx(i, 411.0383,-1774.9216,4.8480, 3.0, CP_BUSFAHRER_LINIE_1_7, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Santa Maria Beach"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  68. case CP_BUSFAHRER_LINIE_1_7:{SetPlayerCheckpointEx(i, 815.4914,-1786.2496,13.1840, 3.0, CP_BUSFAHRER_LINIE_1_8, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Verona Beach"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  69. case CP_BUSFAHRER_LINIE_1_8:{SetPlayerCheckpointEx(i, 1480.6875,-1734.8828,12.9449, 3.0, CP_BUSFAHRER_LINIE_1_9, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Stadthalle"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  70. case CP_BUSFAHRER_LINIE_1_9:{SetPlayerCheckpointEx(i, 1733.4503,-1749.0454,13.0947, 3.0, CP_BUSFAHRER_LINIE_1_10, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Los Santos Busdepot"); PlayerPlaySound(i, 1057, 0, 0, 0);HideBusTextDraw(i);}
  71. case CP_BUSFAHRER_LINIE_1_10:
  72. {
  73. HideBusTextDraw(i);
  74. DisablePlayerCheckpointEx(i);
  75. UpdateDynamic3DTextLabelText(Vehicle[vehicleid][vehText], COLOR_LIGHTWHITE, "Leerfahrt");
  76. SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Leerfahrt!");
  77. new randomGehalt = randomex(2800, 3200); // Maximum ungf. 35200$
  78. format(string, sizeof(string), COLOR_HEX_WHITE"Du hast "COLOR_HEX_YELLOW"$%d "COLOR_HEX_WHITE"auf deinen nächsten Zahltag erhalten!", randomGehalt);
  79. SendClientMessage(i, COLOR_WHITE, string);
  80. new randomSkill = randomex(1, 5);
  81. format(string, sizeof(string), COLOR_HEX_WHITE"Du hast "COLOR_HEX_YELLOW"%d EXP"COLOR_HEX_WHITE" erhalten.", randomSkill);
  82. SendClientMessage(i, COLOR_WHITE, string);
  83. Spieler[i][pJobMoney] += randomGehalt;
  84. Spieler[i][pJobCount] ++;
  85. GivePlayerBusSkill(i, randomSkill);
  86. PlayerPlaySound(i, 1057, 0, 0, 0);
  87. format(string, sizeof(string), "[DEBUG] [BUS] %s(ID:%d) hat Linie 1 in %d Sekunden fertiggestellt.", GetName(i), i, gettime()-Spieler[i][pBusStamp]);
  88. SendClientMessageToAll(COLOR_YELLOW, string);
  89. print(string);
  90. }
  91. // Linie 2
  92. case CP_BUSFAHRER_LINIE_2_1:{SetPlayerCheckpointEx(i, 1871.9470,-1935.1178,13.2142, 3.0, CP_BUSFAHRER_LINIE_2_2, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: El Corona"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i); Spieler[i][pBusStamp] = gettime();}
  93. case CP_BUSFAHRER_LINIE_2_2:{SetPlayerCheckpointEx(i, 2276.1943,-1752.5480,13.2144, 3.0, CP_BUSFAHRER_LINIE_2_3, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Ganton"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  94. case CP_BUSFAHRER_LINIE_2_3:{SetPlayerCheckpointEx(i, 2698.1465,-1660.6047,11.9219, 3.0, CP_BUSFAHRER_LINIE_2_4, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: East Beach (A)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  95. case CP_BUSFAHRER_LINIE_2_4:{SetPlayerCheckpointEx(i, 2878.0823,-1435.9349,10.6250, 3.0, CP_BUSFAHRER_LINIE_2_5, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: East Beach (B)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  96. case CP_BUSFAHRER_LINIE_2_5:{SetPlayerCheckpointEx(i, 2639.8193,-1076.9867,69.2849, 3.0, CP_BUSFAHRER_LINIE_2_6, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Las Colinas (A)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  97. case CP_BUSFAHRER_LINIE_2_6:{SetPlayerCheckpointEx(i, 2674.0710,-1446.1620,30.2073, 3.0, CP_BUSFAHRER_LINIE_2_7, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: East Beach (C)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  98. case CP_BUSFAHRER_LINIE_2_7:{SetPlayerCheckpointEx(i, 2345.7659,-1539.8009,23.6675, 3.0, CP_BUSFAHRER_LINIE_2_8, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: East Los Santos (A)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  99. case CP_BUSFAHRER_LINIE_2_8:{SetPlayerCheckpointEx(i, 2306.7446,-1249.1027,23.6773, 3.0, CP_BUSFAHRER_LINIE_2_9, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: East Los Santos (B)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  100. case CP_BUSFAHRER_LINIE_2_9:{SetPlayerCheckpointEx(i, 2437.0984,-1089.1384,42.0089, 3.0, CP_BUSFAHRER_LINIE_2_10, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Las Colinas (B)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  101. case CP_BUSFAHRER_LINIE_2_10:{SetPlayerCheckpointEx(i, 2520.8274,-1045.1201,69.2458, 3.0, CP_BUSFAHRER_LINIE_2_11, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Las Colinas (C)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  102. case CP_BUSFAHRER_LINIE_2_11:{SetPlayerCheckpointEx(i, 2179.4429,-1004.3890,62.5859, 3.0, CP_BUSFAHRER_LINIE_2_12, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Las Colinas (D)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  103. case CP_BUSFAHRER_LINIE_2_12:{SetPlayerCheckpointEx(i, 1969.5055,-1106.6772,25.3558, 3.0, CP_BUSFAHRER_LINIE_2_13, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Glen Park (A)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  104. case CP_BUSFAHRER_LINIE_2_13:{SetPlayerCheckpointEx(i, 1887.3757,-1338.5367,13.2142, 3.0, CP_BUSFAHRER_LINIE_2_14, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Glen Park (B)"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  105. case CP_BUSFAHRER_LINIE_2_14:{SetPlayerCheckpointEx(i, 1835.5477,-1524.1456,13.2116, 3.0, CP_BUSFAHRER_LINIE_2_15, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Idlewood"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  106. case CP_BUSFAHRER_LINIE_2_15:{SetPlayerCheckpointEx(i, 1733.1927,-1749.1240,13.3542, 3.0, CP_BUSFAHRER_LINIE_2_16, CP_TYPE_BUS); SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Nächste Haltestelle: Los Santos Busdepot"); PlayerPlaySound(i, 1057, 0, 0, 0); HideBusTextDraw(i);}
  107. case CP_BUSFAHRER_LINIE_2_16:
  108. {
  109. HideBusTextDraw(i);
  110. DisablePlayerCheckpointEx(i);
  111. UpdateDynamic3DTextLabelText(Vehicle[vehicleid][vehText], COLOR_LIGHTWHITE, "Leerfahrt");
  112. SendVehicleMessage(vehicleid, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Leerfahrt!");
  113. new randomGehalt = randomex(4000, 4500); // Maximum ungf. 36000$
  114. format(string, sizeof(string), COLOR_HEX_WHITE"Du hast "COLOR_HEX_YELLOW"$%d "COLOR_HEX_WHITE"auf deinen nächsten Zahltag erhalten!", randomGehalt);
  115. SendClientMessage(i, COLOR_WHITE, string);
  116. new randomSkill = randomex(5, 10);
  117. format(string, sizeof(string), COLOR_HEX_WHITE"Du hast "COLOR_HEX_YELLOW"%d EXP"COLOR_HEX_WHITE" erhalten.", randomSkill);
  118. SendClientMessage(i, COLOR_WHITE, string);
  119. Spieler[i][pJobMoney] += randomGehalt;
  120. Spieler[i][pJobCount] ++;
  121. GivePlayerBusSkill(i, randomSkill);
  122. PlayerPlaySound(i, 1057, 0, 0, 0);
  123. format(string, sizeof(string), "[DEBUG] [BUS] %s(ID:%d) hat Linie 2 in %d Sekunden fertiggestellt.", GetName(i), i, gettime()-Spieler[i][pBusStamp]);
  124. SendClientMessageToAll(COLOR_YELLOW, string);
  125. print(string);
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. PayDay(i);
  133. format(string, sizeof(string), "%d Sekunden", pPersoWait[i]);
  134. if(pPersoWait[i] > 1)
  135. {
  136. pPersoWait[i] --;
  137. format(string, sizeof(string), "%d Sekunden", pPersoWait[i]);
  138. ShowPlayerDialog(i, DIALOG_PERSO2, DIALOG_STYLE_MSGBOX, "Stadthalle: Personalausweis", COLOR_HEX_WHITE"Dein Personalausweis wird momentan bearbeitet.\n", string, "");
  139. }else if(pPersoWait[i] == 1){
  140. pPersoWait[i] = 0;
  141. format(string, sizeof(string), "Schließen");
  142. ShowPlayerDialog(i, DIALOG_PERSO2, DIALOG_STYLE_MSGBOX, "Stadthalle: Personalausweis", COLOR_HEX_WHITE"Du hast deinen Personalausweis erhalten\n"COLOR_HEX_YELLOW"\nBitte gehe damit vorsichtig um!", string, "");
  143. }
  144. if(pPayGuthaben[i] > 0)
  145. {
  146. if(pPhoning[i] == 1 && !(pCurrentCall[i] == -2))
  147. {
  148. Spieler[i][pHandyGuthaben] -= 5;
  149. GameTextForPlayer(i, "~r~$-5", 5000, 1);
  150. }
  151. pPayGuthaben[i] --;
  152. }
  153. else
  154. {
  155. if(pPhoning[i] == 1)pPayGuthaben[i] = 60;
  156. else pPayGuthaben[i] = 0;
  157. }
  158. if(pHealed[i] > 0)
  159. {
  160. pHealed[i] --;
  161. }
  162. else pHealed[i] = 0;
  163. if(pErstehilfeUse[i] > 0)
  164. {
  165. pErstehilfeUse[i] --;
  166. }
  167. else pErstehilfeUse[i] = 0;
  168. if(Spieler[i][pTot] > 0)
  169. {
  170. if(Spieler[i][pTotUnix] > 0)
  171. {
  172. format(string, sizeof(string), "~r~Krankenhaus: ~w~%d Sekunden", (Spieler[i][pTotUnix]));
  173. PlayerTextDrawSetString(i, pTextTime[i][2], string);
  174. Spieler[i][pTotUnix] --;
  175. }
  176. else
  177. {
  178. Spieler[i][pTot] = 0;
  179. Spieler[i][pTotUnix] = 0;
  180. Spieler[i][pTotX] = 0.0;
  181. Spieler[i][pTotY] = 0.0;
  182. Spieler[i][pTotZ] = 0.0;
  183. SpawnPlayerEx(i);
  184. }
  185. }
  186.  
  187. if(Spieler[i][pJailed] > 0)
  188. {
  189. if(Spieler[i][pJailTime] > 0)
  190. {
  191. format(string, sizeof(string), "~r~Knast: ~w~%d Sekunden", Spieler[i][pJailTime]);
  192. PlayerTextDrawSetString(i, pTextTime[i][2], string);
  193. Spieler[i][pJailTime] --;
  194. }
  195. else
  196. {
  197. PlayerTextDrawHide(i, pTextTime[i][0]);
  198. PlayerTextDrawHide(i, pTextTime[i][1]);
  199. PlayerTextDrawHide(i, pTextTime[i][2]);
  200. Spieler[i][pJailed] = 0;
  201. Spieler[i][pJailTime] = 0;
  202. Spieler[i][pJailType] = 0;
  203. GameTextForPlayer(i, "~g~Freiheit", 4000, 1);
  204. SetPlayerInterior(i, 0);
  205. SetPlayerPos(i, 1544.4935,-1675.8558,13.5585);
  206. SetPlayerVirtualWorld(i, 0);
  207. UnfreezePlayer(i);
  208. }
  209. }
  210. vehicleid = GetPlayerVehicleID(i);
  211. UpdatePlayerTacho(i);
  212. if(pInformationTimer[i] > 0)pInformationTimer[i] --;
  213. else if(pInformationTimer[i] <= 0)
  214. {
  215. pInformationTimer[i] = 0;
  216. UpdateDynamic3DTextLabelText(Spieler[i][pInformation], COLOR_WHITE, " ");
  217. }
  218. if(pTutorialSkinWait[i] > 1)pTutorialSkinWait[i] --;
  219. else if(pTutorialSkinWait[i] == 1)
  220. {
  221. ClearPlayerChat(i, 20);
  222. pTutorialSkinWait[i] = 0;
  223. for(new xS=0;xS<MAX_SKIN_DATA;xS++)
  224. {
  225. if(SkinData[xS][skinGender] == Spieler[i][pGeschlecht])
  226. {
  227. pChoosedSkin[i] = SkinData[xS][skinID];
  228. pChoosedID[i] = xS;
  229. SetPlayerSkin(i, pChoosedSkin[i]);
  230. break;
  231. }
  232. }
  233. PlayerTextDrawShow(i, pTextSkinChoose[i][0]);
  234. PlayerTextDrawShow(i, pTextSkinChoose[i][1]);
  235. PlayerTextDrawShow(i, pTextSkinChoose[i][2]);
  236. SelectTextDraw(i, 0xA3B4C5FF);
  237. SetPlayerCameraPos(i, 198.7011, -134.6350, 1004.7740);
  238. SetPlayerCameraLookAt(i, 199.3376,-128.0158,1003.5152);
  239. SetPlayerPos(i, 199.3376,-128.0158,1003.5152);
  240. SetPlayerFacingAngle(i, 173.5490);
  241. SetPlayerInterior(i, 3);
  242. SetPlayerVirtualWorld(i, 2000+i);
  243. FreezePlayer(i);
  244. SendClientMessage(i, COLOR_BLUE, "INFO: "COLOR_HEX_WHITE"Bitte wähle einen Skin aus, indem du auf die Knöpfe drückst.");
  245. SendClientMessage(i, COLOR_BLUE, "INFO: "COLOR_HEX_WHITE"Wenn du fertig bist, klicke auf den entsprechenden Knopf.");
  246. }
  247. if(Spieler[i][pCurrentTutorial] == 1)
  248. {
  249. if(Spieler[i][pFahrlehrerWait] > 0)
  250. {
  251. Spieler[i][pFahrlehrerWait] --;
  252. if(Spieler[i][pFahrlehrerWait] == 30)
  253. {
  254. SendClientMessage(i, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Auf unserem Server wird erwartet, dass du auf der rechten Straßenseite fährst.");
  255. }
  256. else if(Spieler[i][pFahrlehrerWait] == 24)
  257. {
  258. SendClientMessage(i, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Halte dich an die Begrenzung von "COLOR_HEX_YELLOW"80km/h"COLOR_HEX_WHITE" innerorts. Außerorts (Autobahnen, Landstraßen, ..) gibt es keine Tempolimits.");
  259. }
  260. else if(Spieler[i][pFahrlehrerWait] == 18)
  261. {
  262. SendClientMessage(i, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Wenn du einen Beamten im Einsatz siehst, fahre bitte an den Straßenrand!");
  263. }
  264. else if(Spieler[i][pFahrlehrerWait] == 12)
  265. {
  266. SendClientMessage(i, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Wenn es zwischen "COLOR_HEX_YELLOW"20 "COLOR_HEX_WHITE"und"COLOR_HEX_YELLOW" 7"COLOR_HEX_WHITE" Uhr ist, schalte bitte das Licht an. ("COLOR_HEX_YELLOW"/licht"COLOR_HEX_WHITE")");
  267. }
  268. else if(Spieler[i][pFahrlehrerWait] == 6)
  269. {
  270. SendClientMessage(i, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Den Motor schaltest du mit '"COLOR_HEX_YELLOW"/motor"COLOR_HEX_WHITE"' an.");
  271. }
  272. else if(Spieler[i][pFahrlehrerWait] == 1)
  273. {
  274. SendClientMessage(i, COLOR_YELLOW, ">> "COLOR_HEX_WHITE"Viel Glück wünscht dir die "COLOR_HEX_YELLOW"SA Fahrschule"COLOR_HEX_WHITE".");
  275. Spieler[i][pFahrlehrerWait] = 0;
  276. UnfreezePlayer(i);
  277. }
  278. }
  279. }
  280. if(Spieler[i][pTutorial] > 0)
  281. {
  282. if(Spieler[i][pCurrentTutorial] == 1)
  283. {
  284. if(vehicleid == Spieler[i][pFSVehicle])
  285. {
  286. new Float:health, Float:health2;
  287. GetVehicleHealth(vehicleid, health);
  288. GetPlayerHealth(i, health2);
  289. if(health < 240 && health2 > 0)
  290. {
  291. DestroyDynamic3DTextLabel(Vehicle[Spieler[i][pFSVehicle]][vehText]);
  292. DeleteVehicle(Spieler[i][pFSVehicle]);
  293. Spieler[i][pFSVehicle] = INVALID_VEHICLE_ID;
  294. SetPlayerPos(i, 1098.1738,-1748.1469,13.3885);
  295. SetCameraBehindPlayer(i);
  296. Spieler[i][pCurrentTutorial] = 0;
  297. Spieler[i][pFahrlehrerWarning] = 0;
  298. SendClientMessage(i, COLOR_RED, "** "COLOR_HEX_GREY"Du bist durchgefallen, versuche es erneut!");
  299. SetPlayerCheckpointEx(i, 1098.1738,-1748.1469,13.3885, 2.0, CP_TUTORIAL_6, CP_TYPE_TUTORIAL);
  300. }
  301. if(!IsPlayerOnAutobahn(i))
  302. {
  303. if(GetVehicleSpeed(vehicleid) > 85)
  304. {
  305. Spieler[i][pFahrlehrerWarning] ++;
  306. format(string, sizeof(string), COLOR_HEX_RED"** "COLOR_HEX_WHITE"%d/10 Fehlerpunkten - Maximal 80km/h!", Spieler[i][pFahrlehrerWarning]);
  307. SendClientMessage(i, COLOR_RED, string);
  308. if(Spieler[i][pFahrlehrerWarning] >= 10)
  309. {
  310. DestroyDynamic3DTextLabel(Vehicle[Spieler[i][pFSVehicle]][vehText]);
  311. DeleteVehicle(Spieler[i][pFSVehicle]);
  312. Spieler[i][pFSVehicle] = INVALID_VEHICLE_ID;
  313. SetPlayerPos(i, 1098.1738,-1748.1469,13.3885);
  314. SetCameraBehindPlayer(i);
  315. Spieler[i][pCurrentTutorial] = 0;
  316. SendClientMessage(i, COLOR_RED, "** "COLOR_HEX_GREY"Du bist durchgefallen, versuche es erneut! (10/10 Fehlerpunkten)");
  317. Spieler[i][pFahrlehrerWarning] = 0;
  318. SetPlayerCheckpointEx(i, 1098.1738,-1748.1469,13.3885, 2.0, CP_TUTORIAL_6, CP_TYPE_TUTORIAL);
  319. }
  320. }
  321. }
  322. }
  323. else
  324. {
  325. DestroyDynamic3DTextLabel(Vehicle[Spieler[i][pFSVehicle]][vehText]);
  326. DeleteVehicle(Spieler[i][pFSVehicle]);
  327. Spieler[i][pFSVehicle] = INVALID_VEHICLE_ID;
  328. SetPlayerPos(i, 1098.1738,-1748.1469,13.3885);
  329. SetCameraBehindPlayer(i);
  330. Spieler[i][pCurrentTutorial] = 0;
  331. SendClientMessage(i, COLOR_RED, "** "COLOR_HEX_GREY"Du bist durchgefallen, versuche es erneut!");
  332. Spieler[i][pFahrlehrerWarning] = 0;
  333. SetPlayerCheckpointEx(i, 1098.1738,-1748.1469,13.3885, 2.0, CP_TUTORIAL_6, CP_TYPE_TUTORIAL);
  334. }
  335. }
  336. }
  337. }
  338. }
  339. }
  340. return 1;
  341. }
Advertisement
Add Comment
Please, Sign In to add comment