Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 304.12 KB | None | 0 0
  1. //-----------------------------------------[Mapa Mrucznik Role Play]-----------------------------------------//
  2. //----------------------------------------------------*------------------------------------------------------//
  3. //---------------------------------(Stworzona na podstawie mapy The Godfather)-------------------------------//
  4. //-------------------------------------------------(v2.5)----------------------------------------------------//
  5. //----------------------------------------------------*------------------------------------------------------//
  6. //----[ ]----//
  7. //----[ ||||| ||||| |||||||||| |||||||||| ]----//
  8. //----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----//
  9. //----[ ||| ||| ||| ||| ||| ||| ||| ||| ]----//
  10. //----[ || || || || ||| ||| ||| ||| ]----//
  11. //----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----//
  12. //----[ || || || || __________ |||||||||| |||||||||| ]----//
  13. //----[ ||| ||| ||| ||| ||| ||| ||| ]----//
  14. //----[ || || || || ||| || ||| ]----//
  15. //----[ ||| ||| ||| ||| ||| ||| ||| ]----//
  16. //----[ || || || || ||| || ||| ]----//
  17. //----[ ||| ||| ||| ||| ||| ||| ||| ]----//
  18. //----[ ||| ||||| ||| ||| ||| ||| ]----//
  19. //----[ ]----//
  20. //----------------------------------------------------*------------------------------------------------------//
  21. /*
  22.  
  23. Mrucznik® Role Play ----> stworzył Mrucznik ----> edycja Jakub 2015
  24.  
  25. <-------------------------------------------------------->
  26. aktualizacja 2.5 system aut mysql, usługi płatne
  27. aktualizacja 2.4.94 prace dorywcze, boomboxy
  28. aktualizacja 2.4.93 strefy gangów
  29. aktualizacja v 2.4.92 Kubi
  30. Edit by Kubi - v 2.4.8 noMysql
  31. <-------------------------------------------------------->
  32. aktualizacja 7 października
  33. aktualizacja 10.08
  34. aktualizacja 29.X
  35. <---------------------------------R----------------------->
  36. Kubi cwel
  37. aktualizacja 2015.11.15 kryptonim PAŹDZIOCH
  38.  
  39. */
  40. //----------------------------------------------------*------------------------------------------------------//
  41.  
  42. //-------------------------------------------<[ Includy ]>---------------------------------------------------//
  43. //- -//
  44. #include <a_samp>
  45. #include <core>
  46. #include <float>
  47. #include <time>
  48. #include <file>
  49. #include <utils>
  50. #include <morphinc>
  51. #include <ysi\y_iterate>
  52. #include "../gamemodes/modules/definicje.pwn"
  53. #include "../gamemodes/modules/enum.pwn"
  54. #include "../gamemodes/modules/forward.pwn"
  55. #include "../gamemodes/modules/funkcje.pwn"
  56. #include "../gamemodes/modules/kolory.pwn"
  57. #include "../gamemodes/modules/komendy.pwn"
  58. #include "../gamemodes/modules/mru_mysql.pwn"
  59. #include "../gamemodes/modules/NOWE_ZMIENNE.pwn"
  60. #include "../gamemodes/modules/OnDialogResponse.pwn"
  61. #include "../gamemodes/modules/pickupy.pwn"
  62. #include "../gamemodes/modules/textdraw.pwn"
  63. #include "../gamemodes/modules/timery.pwn"
  64. #include "../gamemodes/modules/Inne\AC.inc"
  65. #include "../gamemodes/modules/Inne\external.pwn"
  66. #include "../gamemodes/modules/Inne\ibiza.inc"
  67. #include "../gamemodes/modules/Inne\soundmanager.pwn"
  68. #include "../gamemodes/modules/Inne\system_aut.pwn"
  69. #include "../gamemodes/modules/Inne\system_kp.pwn"
  70. #include "../gamemodes/modules/new/bramy/bramy.def"
  71. #include "../gamemodes/modules/new/bramy/bramy.hwn"
  72. #include "../gamemodes/modules/new/bramy/bramy.pwn"
  73. #include "../gamemodes/modules/new/budki/budki.def"
  74. #include "../gamemodes/modules/new/budki/budki.hwn"
  75. #include "../gamemodes/modules/new/budki/budki.pwn"
  76. #include "../gamemodes/modules/new/premium/premium.def"
  77. #include "../gamemodes/modules/new/premium/premium.hwn"
  78. #include "../gamemodes/modules/new/premium/premium.pwn"
  79. #include "../gamemodes/modules/new/premium/premium_dialogs.pwn"
  80. #include "../gamemodes/modules/new/wejscia/wejscia.def"
  81. #include "../gamemodes/modules/new/wejscia/wejscia.hwn"
  82. #include "../gamemodes/modules/new/wejscia/wejscia.pwn"
  83.  
  84.  
  85.  
  86. //------------------------------------------------------------------------------------------------------
  87. main()
  88. {
  89. print("\n----------------------------------");
  90. print("M | --- Mrucznik Role Play --- | M");
  91. print("R | --- **** --- | R");
  92. print("U | --- v2.5 --- | U");
  93. print("C | --- **** --- | C");
  94. print("Z | --- by Mrucznik --- | Z");
  95. print("N | --- --- | N");
  96. print("I | --- /\\_/\\ --- | I");
  97. print("K | --- ===( *.* )=== --- | K");
  98. print(" | --- \\_^_/ --- | ");
  99. print("R | --- | --- | R");
  100. print("P | --- O --- | P");
  101. print("----------------------------------\n");
  102. //exit;
  103. WasteDeAMXersTime();
  104. }
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  113. {
  114. return 1;
  115. }
  116.  
  117. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  118. {
  119. if(MaTazer[playerid] == 1 && (GetPlayerWeapon(playerid) == 23 || GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon(playerid) == 22) && hittype != 1)
  120. {
  121. GameTextForPlayer(playerid, "~r~NIE TRAFILES W GRACZA!~n~~w~TAZER DEZAKTYWOWANY! PRZELADUJ TAZER!", 3000, 5);
  122. MaTazer[playerid] = 0;
  123. return 0;
  124. //PlayerInfo[playerid][pGun2] = 24;
  125. //GivePlayerWeapon(playerid, 24, PlayerInfo[playerid][pAmmo2]);
  126. //RemovePlayerAttachedObject(playerid, 9);
  127. }
  128. if(MaTazer[playerid] == 1 && (GetPlayerWeapon(playerid) == 23 || GetPlayerWeapon(playerid) == 24) && TazerAktywny[hitid] == 0 && GetDistanceBetweenPlayers(playerid,hitid) < 11 && hittype == 1)
  129. {
  130. new giveplayer[MAX_PLAYER_NAME];
  131. new sendername[MAX_PLAYER_NAME];
  132. GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
  133. GetPlayerName(hitid, sendername, sizeof(sendername));
  134. TazerAktywny[hitid] = 1;
  135. SetTimerEx("DostalTazerem", 30000, false, "i", hitid);
  136. new string[128];
  137. GameTextForPlayer(hitid, "DOSTALES TAZEREM! ODCZEKAJ CHWILE!", 3000, 5);
  138. GameTextForPlayer(playerid, "~g~TRAFILES W GRACZA!~n~~w~TAZER DEZAKTYWOWANY! PRZELADUJ TAZER!", 3000, 5);
  139. SetPVarInt(playerid, "wytazerowany", 15);
  140. format(string, sizeof(string), "* %s strzela tazerem w %s.", giveplayer, sendername);
  141. ProxDetector(30.0, hitid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  142. MaTazer[playerid] = 0;
  143. //PlayerInfo[issuerid][pGun2] = 24;
  144. //GivePlayerWeapon(issuerid, 24, PlayerInfo[issuerid][pAmmo2]);
  145. //RemovePlayerAttachedObject(issuerid, 9);
  146. PlayerPlaySound(playerid, 6300, 0.0, 0.0, 0.0);
  147. PlayerPlaySound(hitid, 6300, 0.0, 0.0, 0.0);
  148. ApplyAnimation(hitid, "CRACK","crckdeth2",4.1,0,1,1,1,1,1);
  149. ClearAnimations(hitid);
  150. ApplyAnimation(hitid, "CRACK","crckdeth2",4.1,0,1,1,1,1,1);
  151. TogglePlayerControllable(hitid, 0);
  152. return 0; //nie zabiera hp ! ! !
  153. }
  154. else if(MaTazer[playerid] == 1 && (GetPlayerWeapon(playerid) == 23 || GetPlayerWeapon(playerid) == 24) && TazerAktywny[hitid] == 0 && GetDistanceBetweenPlayers(playerid,hitid) > 10 && hittype == 1)
  155. {
  156. GameTextForPlayer(playerid, "~r~GRACZ BYL ZA DALEKO!~n~~w~TAZER DEZAKTYWOWANY! PRZELADUJ TAZER!", 3000, 5);
  157. MaTazer[playerid] = 0;
  158. return 0;
  159. //PlayerInfo[issuerid][pGun2] = 24;
  160. //GivePlayerWeapon(issuerid, 24, PlayerInfo[issuerid][pAmmo2]);
  161. //RemovePlayerAttachedObject(issuerid, 9);
  162. }
  163. return 1;
  164. }
  165.  
  166. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  167. {
  168. #if DEBUG == 1
  169. printf("%s[%d] OnPlayerClickTextDraw - begin", GetNick(playerid), playerid);
  170. #endif
  171.  
  172. NowaWybieralka::ClickedTxd(playerid, clickedid);
  173.  
  174. new str[128];
  175. if(clickedid == Text:INVALID_TEXT_DRAW)
  176. {
  177. if(GetPVarInt(playerid, "gatechose_active") == 1) //Barierki
  178. {
  179. DestroySelectionMenu(playerid);
  180. SetPVarInt(playerid, "gatechose_active", 0);
  181. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  182. }
  183. if(GetPVarInt(playerid, "ng-gatekey") == 1) //NG keypad
  184. {
  185. SetPVarInt(playerid, "ng-gatekey", 0);
  186. TextDrawHideForPlayer(playerid,NG_GateTD[0]);
  187. TextDrawHideForPlayer(playerid,NG_GateTD[1]);
  188. TextDrawHideForPlayer(playerid,NG_GateTD[2]);
  189. TextDrawHideForPlayer(playerid,NG_GateTD[3]);
  190. TextDrawHideForPlayer(playerid,NG_GateTD[4]);
  191. TextDrawHideForPlayer(playerid,NG_GateTD[5]);
  192. TextDrawHideForPlayer(playerid,NG_GateTD[6]);
  193. TextDrawHideForPlayer(playerid,NG_GateTD[7]);
  194. VAR_NGKeypad = false;
  195. }
  196. if(GetPVarInt(playerid, "skin-select") == 1) // skin selector
  197. {
  198. SetPVarInt(playerid, "skin-select", 0);
  199. CancelSelectTextDraw(playerid);
  200. DestroySkinSelection(playerid);
  201. TogglePlayerControllable(playerid, 1);
  202. }
  203. }
  204. if(GetPVarInt(playerid, "ng-gatekey") == 1)
  205. {
  206. new ngkey[6];
  207.  
  208. GetPVarString(playerid, "ng-key", ngkey, 6);
  209. if(strlen(ngkey) < 4)
  210. {
  211. new num[2];
  212. format(num, 2, "%d", _:clickedid - _:NG_GateTD[1] + 1);
  213. strcat(ngkey, num);
  214. TextDrawSetString(NG_GateTD[7], ngkey);
  215. SetPVarString(playerid, "ng-key", ngkey);
  216.  
  217. if(strlen(ngkey) == 4) NG_OpenGateWithKey(playerid); //apply key
  218. }
  219. #if DEBUG == 1
  220. printf("%s[%d] OnPlayerClickTextDraw - end", GetNick(playerid), playerid);
  221. #endif
  222. return 1;
  223. }
  224.  
  225. //IBIZA
  226. if(clickedid==Text:INVALID_TEXT_DRAW && GetPVarInt(playerid, "IbizaKamery")) //ESC
  227. {
  228. for(new i=0; i<3; i++)
  229. TextDrawHideForPlayer(playerid, TDIbiza[i]);
  230. PlayerTextDrawHide(playerid, PlayerText:GetPVarInt(playerid, "IbizaCam"));
  231. new Float:x, Float:y, Float:z;
  232. x = GetPVarFloat(playerid, "IbizaKameraX");
  233. y = GetPVarFloat(playerid, "IbizaKameraY");
  234. z = GetPVarFloat(playerid, "IbizaKameraZ");
  235. SetPlayerPosEx(playerid, x, y, z);
  236. SetPlayerVirtualWorld(playerid, 1);
  237. SetCameraBehindPlayer(playerid);
  238. Wchodzenie(playerid);
  239. DeletePVar(playerid, "IbizaKamery");
  240. PlayerTextDrawDestroy(playerid, PlayerText:GetPVarInt(playerid, "IbizaCam"));
  241. DeletePVar(playerid, "IbizaCam");
  242. #if DEBUG == 1
  243. printf("%s[%d] OnPlayerClickTextDraw - end", GetNick(playerid), playerid);
  244. #endif
  245. return 1;
  246. }
  247. else
  248. {
  249. new kam = GetPVarInt(playerid, "IbizaKamery");
  250. if(clickedid==TDIbiza[1]) //w prawo
  251. {
  252. kam = (kam==12 ? 1 : kam+1);
  253. SetPVarInt(playerid, "IbizaKamery", kam);
  254. IbizaUstawKamere(playerid, kam-1);
  255. }
  256. if(clickedid==TDIbiza[2]) //w lewo
  257. {
  258. kam = (kam==1 ? 12 : kam-1);
  259. SetPVarInt(playerid, "IbizaKamery", kam);
  260. IbizaUstawKamere(playerid, kam-1);
  261. }
  262.  
  263. }
  264. if(GetPVarInt(playerid, "skin-select") == 1) // skin selector
  265. {
  266. if(clickedid == SkinSelectionAccept)//zatiwerdz
  267. {
  268. if(!GetPVarInt(playerid, "skin-done"))
  269. {
  270. GameTextForPlayer(playerid, "~r~Wybierz ubranie", 1000, 5);
  271. #if DEBUG == 1
  272. printf("%s[%d] OnPlayerClickTextDraw - end", GetNick(playerid), playerid);
  273. #endif
  274. return 1;
  275. }
  276. SetPVarInt(playerid, "skin-select", 0);
  277. CancelSelectTextDraw(playerid);
  278. DestroySkinSelection(playerid);
  279. TogglePlayerControllable(playerid, 1);
  280.  
  281. if(GetPVarInt(playerid, "skin-choosen") != 0)
  282. {
  283. SetPlayerSkin(playerid, GetPVarInt(playerid, "skin-choosen"));
  284. PlayerInfo[playerid][pSkin] = GetPVarInt(playerid, "skin-choosen");
  285. }
  286. }
  287. else if(clickedid == SkinSelectionDenied)//anuluj
  288. {
  289. SetPVarInt(playerid, "skin-select", 0);
  290. CancelSelectTextDraw(playerid);
  291. DestroySkinSelection(playerid);
  292. TogglePlayerControllable(playerid, 1);
  293. }
  294. else if(clickedid == SkinSelectionMy)//moj cywil
  295. {
  296. SetPVarInt(playerid, "skin-select", 0);
  297. CancelSelectTextDraw(playerid);
  298. DestroySkinSelection(playerid);
  299. TogglePlayerControllable(playerid, 1);
  300.  
  301. PlayerInfo[playerid][pSkin] = PlayerInfo[playerid][pModel];
  302. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  303. }
  304. }
  305. //Strefy
  306. if(clickedid == ZoneTXD[3])
  307. {
  308. cmd_atakuj(playerid, "");
  309. }
  310.  
  311. if(GetPVarInt(playerid, "patrol-map") == 1 && GetPVarInt(playerid, "patrolmap") == 1)
  312. {
  313. if(_:clickedid == INVALID_TEXT_DRAW)
  314. {
  315. _MruGracz(playerid, "Wybierz region.");
  316. SelectTextDraw(playerid, 0xD2691E55);
  317. #if DEBUG == 1
  318. printf("%s[%d] OnPlayerClickTextDraw - end", GetNick(playerid), playerid);
  319. #endif
  320. return 1;
  321. }
  322. else
  323. {
  324. new pat = GetPVarInt(playerid, "patrol-id"), fnick[2][MAX_PLAYER_NAME+1];
  325. if((clickedid == PatrolAlfa[0] || clickedid == PatrolAlfa[1]) && Patrolujacych[0] < 4)
  326. {
  327. PatrolInfo[pat][patstrefa] = 1;
  328. _MruGracz(playerid, "Strefa patrolu to ALFA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  329. if(GetPVarInt(playerid, "patrol-duo") == 1) SendClientMessage(PatrolInfo[pat][patroluje][1], COLOR_LIGHTBLUE, "Strefa patrolu to ALFA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  330. Patrolujacych[0]++;
  331. GetPlayerName(playerid, fnick[0], MAX_PLAYER_NAME);
  332. GetPlayerName(PatrolInfo[pat][patroluje][1], fnick[1], MAX_PLAYER_NAME);
  333. format(str, 128, "{FFFFFF}»»{6A5ACD} CENTRALA: {FFFFFF}%s{6A5ACD} 10-30 na strefę Alfa, skład %s %s", PatrolInfo[pat][patname], fnick[0], fnick[1]);
  334. }
  335. else if((clickedid == PatrolBeta[0] || clickedid == PatrolBeta[1]) && Patrolujacych[1] < 4)
  336. {
  337. PatrolInfo[pat][patstrefa] = 2;
  338. _MruGracz(playerid, "Strefa patrolu to BETA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  339. if(GetPVarInt(playerid, "patrol-duo") == 1) SendClientMessage(PatrolInfo[pat][patroluje][1], COLOR_GREEN, "Strefa patrolu to BETA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  340. Patrolujacych[1]++;
  341. GetPlayerName(playerid, fnick[0], MAX_PLAYER_NAME);
  342. GetPlayerName(PatrolInfo[pat][patroluje][1], fnick[1], MAX_PLAYER_NAME);
  343. format(str, 128, "{FFFFFF}»»{6A5ACD} CENTRALA: {FFFFFF}%s{6A5ACD} 10-30 na strefę Beta, skład %s %s", PatrolInfo[pat][patname], fnick[0], fnick[1]);
  344. }
  345. else if((clickedid == PatrolGamma[0] || clickedid == PatrolGamma[1]) && Patrolujacych[2] < 6)
  346. {
  347. PatrolInfo[pat][patstrefa] = 3;
  348. _MruGracz(playerid, "Strefa patrolu to GAMMA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  349. if(GetPVarInt(playerid, "patrol-duo") == 1) SendClientMessage(PatrolInfo[pat][patroluje][1], COLOR_RED, "Strefa patrolu to GAMMA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  350. Patrolujacych[2]++;
  351. GetPlayerName(playerid, fnick[0], MAX_PLAYER_NAME);
  352. GetPlayerName(PatrolInfo[pat][patroluje][1], fnick[1], MAX_PLAYER_NAME);
  353. format(str, 128, "{FFFFFF}»»{6A5ACD} CENTRALA: {FFFFFF}%s{6A5ACD} 10-30 na strefę Gamma, skład %s %s", PatrolInfo[pat][patname], fnick[0], fnick[1]);
  354. }
  355. else if((clickedid == PatrolDelta[0] || clickedid == PatrolDelta[1]) && Patrolujacych[3] < 6)
  356. {
  357. PatrolInfo[pat][patstrefa] = 4;
  358. _MruGracz(playerid, "Strefa patrolu to DELTA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  359. if(GetPVarInt(playerid, "patrol-duo") == 1) SendClientMessage(PatrolInfo[pat][patroluje][1], COLOR_YELLOW, "Strefa patrolu to DELTA.{FFFFFF} Udaj się w to miejsce i pamiętaj o kodach radiowych!");
  360. Patrolujacych[3]++;
  361. GetPlayerName(playerid, fnick[0], MAX_PLAYER_NAME);
  362. GetPlayerName(PatrolInfo[pat][patroluje][1], fnick[1], MAX_PLAYER_NAME);
  363. format(str, 128, "{FFFFFF}»»{6A5ACD} CENTRALA: {FFFFFF}%s:{6A5ACD} 10-30 na strefę Delta, skład %s %s", PatrolInfo[pat][patname], fnick[0], fnick[1]);
  364. }
  365. else _MruGracz(playerid, "Brak wolnego miejsca w tej strefie, spróbuj inną.");
  366. if(PatrolInfo[pat][patstrefa] != 0)
  367. {
  368. PatrolInfo[pat][pataktywny] = 1;
  369. Patrol_HideMap(playerid);
  370. CancelSelectTextDraw(playerid);
  371. SetPVarInt(playerid, "patrol-map", 0);
  372. SendTeamMessage(1, COLOR_ALLDEPT, str);
  373.  
  374. Patrol_DisplayZones(playerid);
  375. if(GetPVarInt(playerid, "patrol-duo") == 1) Patrol_DisplayZones(PatrolInfo[pat][patroluje][1]);
  376. }
  377. }
  378. }
  379. else if(GetPVarInt(playerid, "patrolmap") == 1)
  380. {
  381. if(_:clickedid == INVALID_TEXT_DRAW)
  382. {
  383. CancelSelectTextDraw(playerid);
  384. Patrol_HideMap(playerid);
  385. #if DEBUG == 1
  386. printf("%s[%d] OnPlayerClickTextDraw - end", GetNick(playerid), playerid);
  387. #endif
  388. return 1;
  389. }
  390. new stanp[32], pnick1[24], pnick2[MAX_PLAYER_NAME+1];
  391. for(new i=0;i<MAX_PATROLS;i++)
  392. {
  393. if(clickedid == PatrolMarker[i] && PatrolInfo[i][pataktywny] == 1)
  394. {
  395. GetPlayerName(PatrolInfo[i][patroluje][0], pnick1, MAX_PLAYER_NAME);
  396. GetPlayerName(PatrolInfo[i][patroluje][1], pnick2, MAX_PLAYER_NAME);
  397. switch(PatrolInfo[i][patstan])
  398. {
  399. case 1: stanp="Sytuacja pod kontrolą";
  400. case 2: stanp="Potrzebne wsparcie";
  401. case 3: stanp="Pościg za podejrzanym";
  402. case 4: stanp="Ranny funkcjonariusz";
  403. }
  404. format(str, 128, "Patrol %s - Funkcjonariusze: %s %s. Stan: %s", PatrolInfo[i][patname], pnick1, pnick2, stanp);
  405. _MruGracz(playerid, str);
  406. break;
  407. }
  408. }
  409. }
  410. if(clickedid == TXD_Info) //Display server info
  411. {
  412. if(strlen(ServerInfo) > 1) ShowPlayerDialogEx(playerid, D_SERVERINFO, DIALOG_STYLE_MSGBOX, "Mrucznik-RP » Informacja", ServerInfo, "Schowaj", "Zamknij");
  413. }
  414. #if DEBUG == 1
  415. printf("%s[%d] OnPlayerClickTextDraw - end", GetNick(playerid), playerid);
  416. #endif
  417. return 1;
  418. }
  419.  
  420. public OnPlayerEnterDynamicArea(playerid, areaid)
  421. {
  422. #if DEBUG == 1
  423. printf("%s[%d] OnPlayerEnterDynamicArea - begin", GetNick(playerid), playerid);
  424. #endif
  425. if(IsPlayerInAnyVehicle(playerid))
  426. {
  427. new kolid=-1;
  428. for(new i=0;i<MAX_OILS;i++)
  429. {
  430. if(OilData[i][oilArea] == areaid && areaid != 0)
  431. {
  432. kolid = i;
  433. break;
  434. }
  435. }
  436. if(kolid != -1 && OilData[kolid][oilHP] > 0)
  437. {
  438. OnPlayerEnterOilSpot(playerid);
  439. #if DEBUG == 1
  440. printf("%s[%d] OnPlayerEnterDynamicArea - end", GetNick(playerid), playerid);
  441. #endif
  442. return;
  443. }
  444. kolid = -1;
  445. for(new i=0;i<MAX_KOLCZATEK;i++)
  446. {
  447. if(KolArea[i] == areaid && areaid != 0)
  448. {
  449. kolid = i;
  450. break;
  451. }
  452. }
  453. if(kolid != -1)
  454. {
  455. OnPlayerEnterSpikes(playerid);
  456. #if DEBUG == 1
  457. printf("%s[%d] OnPlayerEnterDynamicArea - end", GetNick(playerid), playerid);
  458. #endif
  459. return;
  460. }
  461. }
  462. #if DEBUG == 1
  463. printf("%s[%d] OnPlayerEnterDynamicArea - end", GetNick(playerid), playerid);
  464. #endif
  465. }
  466.  
  467. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  468. {
  469. #if DEBUG == 1
  470. printf("%s[%d] OnPlayerClickPlayerTextDraw - begin", GetNick(playerid), playerid);
  471. #endif
  472. if(GetPVarInt(playerid, "gatechose_active") == 1) //Barierki
  473. {
  474. new curpage = GetPVarInt(playerid, "gatechose_page");
  475.  
  476. if(playertextid == gNextButtonTextDrawId[playerid]) {
  477. if(curpage < (GetNumberOfPages() - 1)) {
  478. SetPVarInt(playerid, "gatechose_page", curpage + 1);
  479. ShowPlayerModelPreviews(playerid);
  480. UpdatePageTextDraw(playerid);
  481. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  482. } else {
  483. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  484. }
  485. #if DEBUG == 1
  486. printf("%s[%d] OnPlayerClickPlayerTextDraw - end", GetNick(playerid), playerid);
  487. #endif
  488. return 1;
  489. }
  490. if(playertextid == gPrevButtonTextDrawId[playerid]) {
  491. if(curpage > 0) {
  492. SetPVarInt(playerid, "gatechose_page", curpage - 1);
  493. ShowPlayerModelPreviews(playerid);
  494. UpdatePageTextDraw(playerid);
  495. PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
  496. } else {
  497. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  498. }
  499. #if DEBUG == 1
  500. printf("%s[%d] OnPlayerClickPlayerTextDraw - end", GetNick(playerid), playerid);
  501. #endif
  502. return 1;
  503. }
  504. new x=0;
  505. while(x != SELECTION_ITEMS) {
  506. if(playertextid == gSelectionItems[playerid][x]) {
  507. HandlePlayerItemSelection(playerid, x);
  508. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  509. DestroySelectionMenu(playerid);
  510. CancelSelectTextDraw(playerid);
  511. SetPVarInt(playerid, "gatechose_active", 0);
  512. #if DEBUG == 1
  513. printf("%s[%d] OnPlayerClickPlayerTextDraw - end", GetNick(playerid), playerid);
  514. #endif
  515. return 1;
  516. }
  517. x++;
  518. }
  519. }
  520. if(SkinSelection[playerid][0] <= _:playertextid < SkinSelection[playerid][MAX_SKIN_SELECT])
  521. {
  522. new idx = _:playertextid-_:SkinSelection[playerid][0];
  523. if(0 <= idx <= MAX_SKIN_SELECT)
  524. {
  525. new typ = GetPVarInt(playerid, "skin-typ");
  526. new frac = GetPlayerFraction(playerid);
  527. if(frac == 0) frac = GetPlayerOrg(playerid);
  528. switch(typ) //switch na tablice ze skinami
  529. {
  530. case 1: PlayerTextDrawSetPreviewModel(playerid, PlayerText:SkinSelection[playerid][MAX_SKIN_SELECT], FRAC_SKINS[frac][idx]), SetPVarInt(playerid, "skin-choosen", FRAC_SKINS[frac][idx]);
  531. case 2: PlayerTextDrawSetPreviewModel(playerid, PlayerText:SkinSelection[playerid][MAX_SKIN_SELECT], FAM_SKINS[frac][idx]), SetPVarInt(playerid, "skin-choosen", FAM_SKINS[frac][idx]);
  532. }
  533. PlayerTextDrawShow(playerid, PlayerText:SkinSelection[playerid][MAX_SKIN_SELECT]);
  534. SetPVarInt(playerid, "skin-index", idx);
  535. SetPVarInt(playerid, "skin-done", 1);
  536. }
  537. }
  538. #if DEBUG == 1
  539. printf("%s[%d] OnPlayerClickPlayerTextDraw - end", GetNick(playerid), playerid);
  540. #endif
  541. return 1;
  542. }
  543.  
  544. /*public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  545. {
  546. return 1;
  547. } */
  548.  
  549. public OnEnterExitModShop(playerid, enterexit, interiorid)
  550. {
  551. #if DEBUG == 1
  552. printf("%s[%d] OnEnterExitModShop - begin", GetNick(playerid), playerid);
  553. #endif
  554. if(enterexit == 0)
  555. {
  556. if(GetPlayerVehicleID(playerid) != 0)
  557. CarData[VehicleUID[GetPlayerVehicleID(playerid)][vUID]][c_HP] = 1000.0;
  558. }
  559. #if DEBUG == 1
  560. printf("%s[%d] OnEnterExitModShop - end", GetNick(playerid), playerid);
  561. #endif
  562. return 1;
  563. }
  564.  
  565. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  566. {
  567. #if DEBUG == 1
  568. printf("%s[%d] OnPlayerEnterVehicle - begin", GetNick(playerid), playerid);
  569. #endif
  570. if(vehicleid > MAX_VEHICLES || vehicleid < 0)
  571. {
  572. _MruGracz(playerid, "Warning: Exceed vehicle limit");
  573. #if DEBUG == 1
  574. printf("%s[%d] OnPlayerEnterVehicle - end", GetNick(playerid), playerid);
  575. #endif
  576. return 0;
  577. }
  578. new validseat = GetVehicleMaxPassengers(GetVehicleModel(vehicleid));
  579. if(validseat == 0xF)
  580. {
  581. _MruGracz(playerid, "Warning: Invalid seat");
  582. #if DEBUG == 1
  583. printf("%s[%d] OnPlayerEnterVehicle - end", GetNick(playerid), playerid);
  584. #endif
  585. return 0;
  586. }
  587. if(gPlayerLogged[playerid] == 0)
  588. {
  589. if(!IsPlayerNPC(playerid)) // znow tylko funkcja dla botow
  590. {
  591. _MruGracz(playerid, "** Musisz się zalogować zanim wybierzesz skin (Zostałeś wyrzucony) **");
  592. SetTimerEx("KickTimer",500,0,"d",playerid);
  593. }
  594. #if DEBUG == 1
  595. printf("%s[%d] OnPlayerEnterVehicle - end", GetNick(playerid), playerid);
  596. #endif
  597. return 0;
  598. }
  599.  
  600. //PAŹDZIOCH
  601. if(IsAHeliModel(GetVehicleModel(vehicleid)) && ispassenger)
  602. {
  603. SetPVarInt(playerid,"chop_id",GetPlayerVehicleID(playerid));
  604. SetPVarInt(playerid,"roped",0);
  605. }
  606. else SetPVarInt(playerid,"chop_id",0);
  607.  
  608. new engine, lights, alarm, doors, bonnet, boot, objective;
  609. GetVehicleParamsEx(vehicleid, engine, lights ,alarm, doors, bonnet, boot, objective);
  610. //AT400
  611. if(GetVehicleModel(vehicleid) == 577 && !IsPlayerInFraction(playerid, FRAC_KT, 5000))
  612. {
  613. new Float:slx, Float:sly, Float:slz;
  614. GetPlayerPos(playerid, slx, sly, slz);
  615. SetPlayerPosEx(playerid, slx, sly, slz+0.1);
  616. ClearAnimations(playerid);
  617. }
  618.  
  619. if(!ispassenger)
  620. {
  621. if(!Player::CanUseCar(playerid, vehicleid))
  622. return Player::RemoveFromVeh(playerid);
  623. }
  624.  
  625. if(IsARower(vehicleid))
  626. {
  627. SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
  628. }
  629. else
  630. {
  631. if(!ispassenger && !engine) MSGBOX_Show(playerid, "~k~~CONVERSATION_YES~ - odpala pojazd", MSGBOX_ICON_TYPE_OK);
  632. }
  633.  
  634. if (IsACopCar(vehicleid) && !ispassenger)
  635. {
  636. if(IsACop(playerid))
  637. {
  638. sendTipMessageEx(playerid, COLOR_BLUE, "Połączyłeś się z komputerem policyjnym, wpisz /mdc aby zobaczyć kartotekę policyjną");
  639. }
  640. else
  641. {
  642. new Float:slx, Float:sly, Float:slz;
  643. GetPlayerPos(playerid, slx, sly, slz);
  644. SetPlayerPosEx(playerid, slx, sly, slz+1);
  645. ClearAnimations(playerid);
  646. }
  647. }
  648.  
  649. if (IsAnAmbulance(vehicleid) && !ispassenger)
  650. {
  651. if(IsAMedyk(playerid) && JobDuty[playerid] == 0 )
  652. {
  653. sendTipMessageEx(playerid, COLOR_GRAD1, "Nie jesteś medykiem na służbie!");
  654. Player::RemoveFromVeh(playerid);
  655. }
  656. else if(!IsAMedyk(playerid))
  657. {
  658. sendTipMessageEx(playerid, COLOR_GRAD1, "Nie jesteś medykiem!");
  659. Player::RemoveFromVeh(playerid);
  660. }
  661. }
  662. if (GetVehicleModel(vehicleid) == 525)
  663. {
  664. sendTipMessageEx(playerid, COLOR_BROWN, "Wsiadłeś do holownika, naciśnij CTRL alby podholować wóz.");
  665. }
  666. #if DEBUG == 1
  667. printf("%s[%d] OnPlayerEnterVehicle - end", GetNick(playerid), playerid);
  668. #endif
  669. return 1;
  670. }
  671.  
  672. #define PreloadAnimLib(%1,%2) ApplyAnimation(%1,%2,"null",0.0,0,0,0,0,0)
  673.  
  674. //---------------------------<[ OnPlayerConnect: ]>---------------------------
  675. public OnPlayerConnect(playerid)
  676. {
  677. #if DEBUG == 1
  678. printf("%s[%d] OnPlayerConnect - begin", GetNick(playerid), playerid);
  679. #endif
  680.  
  681. Ac_OnPlayerConnect(playerid);
  682.  
  683. ZerujZmienne(playerid);
  684.  
  685. ClearChat(playerid);
  686.  
  687. // Wyłączone na testy
  688. //Usun_Obiekty(playerid); //stare obiekty
  689. //obiekty_OnPlayerConnect(playerid);//nowe obiekty
  690.  
  691. pName[playerid][0] = EOS;
  692. pNameRp[playerid][0] = EOS;
  693.  
  694. new name[MAX_PLAYER_NAME+1];
  695.  
  696. GetPlayerName(playerid, name, MAX_PLAYER_NAME+1);
  697.  
  698. strcat(pName[playerid], name);
  699. strcat(pNameRp[playerid], name);
  700.  
  701. strreplace(pNameRp[playerid], '_', ' ');
  702.  
  703. LoadTextDraws(playerid);
  704.  
  705. LoadingShow(playerid);
  706.  
  707. LoadingHide(playerid);
  708.  
  709. //Poprawny nick:
  710. new nick[MAX_PLAYER_NAME];
  711. GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
  712. if(!IsNickCorrect(nick))
  713. {
  714. _MruGracz(playerid, "SERWER: Twój nick jest niepoprawny! Nick musi posiadać formę: Imię_Nazwisko!");
  715. KickEx(playerid);
  716. #if DEBUG == 1
  717. printf("%s[%d] OnPlayerConnect - end", GetNick(playerid), playerid);
  718. #endif
  719. return 1;
  720. }
  721.  
  722. //Początkowe ustawienia:
  723. SetTimerEx("OPCLogin", 100, 0, "i", playerid);
  724.  
  725. //system barierek by Kubi
  726. gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  727. gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  728. gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  729. gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  730. gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  731.  
  732. for(new x=0; x < SELECTION_ITEMS; x++) {
  733. gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
  734. }
  735.  
  736. gItemAt[playerid] = 0;
  737. printf("Poprawnie Connect ID: %d", playerid);
  738. #if DEBUG == 1
  739. printf("%s[%d] OnPlayerConnect - end", GetNick(playerid), playerid);
  740. #endif
  741. return 1;
  742. }
  743.  
  744. //--------------------<[ OnPlayerPause ]>--------------------
  745. public OnPlayerPause(playerid)
  746. {
  747. if(afk_timer[playerid] == -1)
  748. {
  749. afk_timer[playerid] = SetTimerEx("PlayerAFK", 1000, false, "iii", playerid, 1, 0);
  750. }
  751. return 1;
  752. }
  753. //-------------------------------<[ OnPlayerDisconnect ]>-------------------------------
  754. public OnPlayerDisconnect(playerid, reason)
  755. {
  756. //Pobieranie starej pozycji:
  757.  
  758. #if DEBUG == 1
  759. printf("%s[%d] OnPlayerDisconnect - begin", GetNick(playerid), playerid);
  760. #endif
  761. GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  762. PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
  763.  
  764. if(GetPVarInt(playerid, "kolejka") == 1)
  765. {
  766. PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "kolejka-x");
  767. PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "kolejka-y");
  768. PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "kolejka-z");
  769. PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "kolejka-int");
  770. }
  771.  
  772. Update3DTextLabelText(PlayerInfo[playerid][pDescLabel], 0xBBACCFFF, "");
  773.  
  774. //AFK timer
  775. if(afk_timer[playerid] != -1)
  776. {
  777. KillTimer(afk_timer[playerid]);
  778. afk_timer[playerid] = -1;
  779. }
  780. if(GetPVarInt(playerid, "finding") == 1) {
  781. GangZoneDestroy(pFindZone[playerid]);
  782. }
  783. //PAŹDZIOCH - lina SWAT
  784. if(GetPVarInt(playerid,"roped") == 1)
  785. {
  786. for(new i=0;i<=ROPELENGTH;i++)
  787. {
  788. DestroyDynamicObject(r0pes[playerid][i]);
  789. }
  790. }
  791.  
  792. //budki telefoniczne
  793. if(GetPVarInt(playerid, "budka-Mobile") != 999) {
  794. new caller = GetPVarInt(playerid, "budka-Mobile");
  795. if(GetPVarInt(caller, "budka-Mobile") == playerid) {
  796. sendTipMessage(caller, "**biiip biiip** połączenie zostało przerwane ((Wyjście z gry))", COLOR_PAPAYAWHIP);
  797. budki[GetPVarInt(playerid, "budka-used")][isCurrentlyUsed] = 0;
  798. budki[GetPVarInt(caller, "budka-used")][isCurrentlyUsed] = 0;
  799. SetPVarInt(caller, "budka-Mobile", 999);
  800. SetPVarInt(caller, "budka-used", 999);
  801. }
  802. }
  803.  
  804. if(GetPVarInt(playerid, "kostka"))
  805. {
  806. new id = GetPVarInt(playerid, "kostka-player");
  807. Kostka_Wygrana(id, playerid, GetPVarInt(id, "kostka-cash"), true);
  808. SendClientMessage(id, COLOR_RED, "Współzawodnik opuscił serwer, otrzymujesz zwrot wpłaconej kwoty z podatkiem.");
  809. SetPVarInt(playerid, "kostka",0);
  810. SetPVarInt(playerid, "kostka-throw", 0);
  811. SetPVarInt(playerid, "kostka-suma", 0);
  812. SetPVarInt(playerid, "kostka-cash", 0);
  813. SetPVarInt(playerid, "kostka-first", 0);
  814. SetPVarInt(playerid, "kostka-rzut", 0);
  815. SetPVarInt(playerid, "kostka-wait", 0);
  816. SetPVarInt(playerid, "kostka-player", 0);
  817. }
  818. //if(PlayerTied[playerid] >= 1 || PlayerCuffed[playerid] >= 1 || zakuty[playerid] >= 1 || poscig[playerid] == 1)
  819. if(PlayerTied[playerid] >= 1 || (PlayerCuffed[playerid] >= 1 && pobity[playerid] == 0 && PlayerCuffed[playerid] < 3) || zakuty[playerid] >= 1 || poscig[playerid] == 1)
  820. {
  821. //if(pobity[playerid] == 0)
  822. //{
  823. PlayerInfo[playerid][pJailed] = 10;
  824. new string[130];
  825. new powod[36];
  826. if(PlayerTied[playerid] >= 1)
  827. {
  828. strcat(powod, "bycie zwiazanym (lub /ob), ");
  829. }
  830. if(PlayerCuffed[playerid] >= 1)
  831. {
  832. strcat(powod, "kajdanki w aucie (lub /ob), ");
  833. }
  834. if(zakuty[playerid] >= 1)
  835. {
  836. strcat(powod, "kajdanki pieszo, ");
  837. }
  838. if(poscig[playerid] >= 1)
  839. {
  840. strcat(powod, "pościg, ");
  841. }
  842. new codal[16];
  843. switch(reason)
  844. {
  845. case 0: codal = "timeout";
  846. case 1: codal = "/q";
  847. case 2: codal = "kick/ban";
  848. }
  849. format(string, 130, "%s dostanie Marcepana za możliwe: %s (%s)", GetNick(playerid, true), powod, codal);
  850. SendAdminMessage(COLOR_P@, string);
  851. }
  852.  
  853. if(PoziomPoszukiwania[playerid] >= 1)
  854. {
  855. new wl = PoziomPoszukiwania[playerid];
  856. PlayerInfo[playerid][pWL] = wl;
  857. }
  858.  
  859. if(TransportDist[playerid] > 0.0 && TransportDriver[playerid] < 999)
  860. {
  861. Taxi_Pay(playerid);
  862. }
  863.  
  864. //System aut
  865. Car_UnloadForPlayer(playerid);
  866. // zapisanie PK
  867. new karne = GetPVarInt(playerid, "mandat_punkty");
  868. if(karne>0) {
  869. PlayerInfo[playerid][pPK] += karne;
  870. }
  871. //
  872. //Zapis statystyk:
  873. MruMySQL_SaveAccount(playerid, false, true);
  874.  
  875. if(GetPVarInt(playerid, "active_ticket") != 0)
  876. Support_ClearTicket(GetPVarInt(playerid, "active_ticket")-1);
  877.  
  878. if(GetPVarInt(playerid, "oil_clear") == 1)
  879. {
  880. Oil_UnloadPTXD(playerid);
  881. TextDrawShowForPlayer(playerid, OilTXD_BG[0]);
  882. TextDrawShowForPlayer(playerid, OilTXD_BG[1]);
  883. }
  884.  
  885. /*if(GetPVarInt(playerid, "patrol") != 0)
  886. {
  887. cmd_patrol(playerid, "stop");
  888. }
  889. if(GetPVarInt(playerid, "patrolmap") == 1)
  890. {
  891. Patrol_HideMap(playerid);
  892. } */
  893. if(GetPVarInt(playerid, "patrol") != 0) {
  894. new patrol = GetPVarInt(playerid, "patrol-id");
  895. cmd_patrol(PatrolInfo[patrol][patroluje][0], "stop");
  896. cmd_patrol(PatrolInfo[patrol][patroluje][1], "stop");
  897. sendTipMessageEx(PatrolInfo[patrol][patroluje][1], COLOR_PAPAYAWHIP, "Partner opuścił patrol. 10-33!");
  898. sendTipMessageEx(PatrolInfo[patrol][patroluje][0], COLOR_PAPAYAWHIP, "Partner opuścił patrol. 10-33!");
  899. }
  900. if(TalkingLive[playerid] != INVALID_PLAYER_ID)
  901. {
  902. new callin = Callin[playerid];
  903. new talker = TalkingLive[playerid];
  904. TalkingLive[playerid] = INVALID_PLAYER_ID;
  905. TalkingLive[callin] = INVALID_PLAYER_ID;
  906. TalkingLive[talker] = INVALID_PLAYER_ID;
  907. Mobile[callin] = 1255;
  908. Mobile[playerid] = 1255;
  909. return 0;
  910. }
  911. //SetPVarInt(playerid, "patrol-id", pat);
  912. //SetPVarInt(playerid, "patrol", 1);
  913. if(GetPVarInt(playerid, "rentTimer") != 0)
  914. {
  915. UnhireRentCar(playerid, GetPVarInt(playerid, "rentCar"));
  916. KillTimer(GetPVarInt(playerid, "rentTimer"));
  917. }
  918.  
  919. //12.06.2014 opis
  920. //Opis_Usun(playerid);
  921.  
  922. if(noclipdata[playerid][fireobject] != 0)
  923. {
  924. DestroyDynamicObject(noclipdata[playerid][fireobject]);
  925. noclipdata[playerid][fireobject] = 0;
  926. }
  927.  
  928. if(GetPVarInt(playerid, "skin-select") != 0)
  929. DestroySkinSelection(playerid);
  930.  
  931. //strefy
  932. if(ZonePlayerTimer[playerid] != 0) KillTimer(ZonePlayerTimer[playerid]);
  933.  
  934. UnLoadTextDraws(playerid);
  935.  
  936. INT_AirTowerLS_Exit(playerid, true, true);
  937.  
  938. //09.06.2014 wylaczenie ng pad
  939. if(GetPVarInt(playerid, "ng-gatekey") == 1)
  940. {
  941. SetPVarInt(playerid, "ng-gatekey", 0);
  942. VAR_NGKeypad = false;
  943. }
  944.  
  945. if(PDGPS == playerid)
  946. {
  947. foreach(Player, i)
  948. {
  949. if(IsACop(i) || IsAMedyk(i) || GetPlayerFraction(i) == FRAC_LSFD || (PlayerInfo[i][pMember] == 9 && SanDuty[i] == 1) || (PlayerInfo[i][pLider] == 9 && SanDuty[i] == 1))
  950. {
  951. DisablePlayerCheckpoint(i);
  952. }
  953. }
  954. }
  955.  
  956. if(ScigaSie[playerid] != 666 && IloscCH[playerid] != 0)
  957. {
  958. new string[64];
  959. new sendername[MAX_PLAYER_NAME];
  960. GetPlayerName(playerid, sendername, sizeof(sendername));
  961. format(string, sizeof(string), "Wyścig: {FFFFFF}%s wyszedł z gry", sendername);
  962. foreach(Player, i)
  963. {
  964. if(ScigaSie[i] == Scigamy)
  965. {
  966. SendClientMessage(i, COLOR_YELLOW, string);
  967. }
  968. }
  969. IloscZawodnikow --;
  970. if(IloscZawodnikow <= Ukonczyl)
  971. {
  972. KoniecWyscigu(-1);
  973. }
  974. }
  975.  
  976. if(SkutyGracz[playerid] != 0)
  977. {
  978. PDkuje[SkutyGracz[playerid]] = 0;
  979. zakuty[SkutyGracz[playerid]] = 0;
  980. SkutyGracz[playerid] = 0;
  981. }
  982.  
  983. if(HireCar[playerid] != 0)
  984. {
  985. CarData[VehicleUID[HireCar[playerid]][vUID]][c_Rang] = 0;
  986. }
  987.  
  988. new bbxid = GetPVarInt(playerid, "boomboxid");
  989. if(BoomBoxData[bbxid][BBD_Carried]-1 == playerid)
  990. {
  991. BoomBoxData[bbxid][BBD_Standby] = false;
  992. BBD_Putdown(playerid, bbxid);
  993. }
  994.  
  995. TextDrawHideForPlayer(playerid, TXD_Info);
  996.  
  997. //Komunikaty dla graczy na serwerze:
  998. foreach(Player, i)
  999. {
  1000. if(IsPlayerConnected(i) && i != playerid)
  1001. {
  1002. if(TaxiAccepted[i] < 500)
  1003. {
  1004. if(TaxiAccepted[i] == playerid)
  1005. {
  1006. TaxiAccepted[i] = 999;
  1007. GameTextForPlayer(i, "~w~Klient Taxi~n~~r~Wyszedl z gry", 5000, 1);
  1008. TaxiCallTime[i] = 0;
  1009. DisablePlayerCheckpoint(i);
  1010. }
  1011. }
  1012. else if(BusAccepted[i] < 500)
  1013. {
  1014. if(BusAccepted[i] == playerid)
  1015. {
  1016. BusAccepted[i] = 999;
  1017. GameTextForPlayer(i, "~w~Klient autobusu~n~~r~Wyszedl z gry", 5000, 1);
  1018. BusCallTime[i] = 0;
  1019. DisablePlayerCheckpoint(i);
  1020. }
  1021. }
  1022. }
  1023. }
  1024. if(GotHit[playerid] > 0)
  1025. {
  1026. if(GetChased[playerid] < 500)
  1027. {
  1028. if(IsPlayerConnected(GetChased[playerid]))
  1029. {
  1030. SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Twój cel opuścił serwer.");
  1031. GoChase[GetChased[playerid]] = 999;
  1032. }
  1033. }
  1034. }
  1035. if(PlayerPaintballing[playerid] != 0)
  1036. {
  1037. PaintballPlayers --;
  1038. }
  1039. if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
  1040. {
  1041. KartingPlayers --;
  1042. }
  1043. if(PlayersChannel[playerid] < 500)
  1044. {
  1045. IRCInfo[PlayersChannel[playerid]][iPlayers] --;
  1046. }
  1047. if(PlayerBoxing[playerid] > 0)
  1048. {
  1049. if(Boxer1 == playerid)
  1050. {
  1051. if(IsPlayerConnected(Boxer2))
  1052. {
  1053. PlayerBoxing[Boxer2] = 0;
  1054. SetPlayerPosEx(Boxer2, 765.8433,3.2924,1000.7186);
  1055. SetPlayerInterior(Boxer2, 5);
  1056. GameTextForPlayer(Boxer2, "~r~Walka przerwana", 5000, 1);
  1057. }
  1058. }
  1059. else if(Boxer2 == playerid)
  1060. {
  1061. if(IsPlayerConnected(Boxer1))
  1062. {
  1063. PlayerBoxing[Boxer1] = 0;
  1064. SetPlayerPosEx(Boxer1, 765.8433,3.2924,1000.7186);
  1065. SetPlayerInterior(Boxer1, 5);
  1066. GameTextForPlayer(Boxer1, "~r~Walka przerwana", 5000, 1);
  1067. }
  1068. }
  1069. InRing = 0;
  1070. RoundStarted = 0;
  1071. Boxer1 = 255;
  1072. Boxer2 = 255;
  1073. TBoxer = 255;
  1074. }
  1075. if(TransportDuty[playerid] == 1)
  1076. {
  1077. TaxiDrivers -= 1;
  1078. }
  1079. else if(TransportDuty[playerid] == 2)
  1080. {
  1081. BusDrivers -= 1;
  1082. }
  1083. if(PlayerInfo[playerid][pJob] == 11)
  1084. {
  1085. if(JobDuty[playerid] == 1) { Medics -= 1; }
  1086. }
  1087. else if(PlayerInfo[playerid][pJob] == 7)
  1088. {
  1089. if(JobDuty[playerid] == 1) { Mechanics -= 1; }
  1090. }
  1091.  
  1092. gPlayerLogged[playerid] = 0; //wylogowany
  1093. MRP_PremiumHours[playerid] = 0;
  1094. #if DEBUG == 1
  1095. printf("%s[%d] OnPlayerDisconnect - end", GetNick(playerid), playerid);
  1096. #endif
  1097. return 1;
  1098. }
  1099.  
  1100. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  1101. {
  1102. if(weaponid == WEAPON_GRENADE || weaponid == 51)
  1103. {
  1104. new Float:health;
  1105. GetPlayerHealth(playerid,health);
  1106. SetPlayerHealth(playerid, (health)-5);
  1107. ShowPlayerFadeScreenToBlank(playerid, 20, 255, 255, 255, 255);
  1108. SetPlayerDrunkLevel(playerid, 3000);
  1109. }
  1110. switch(bodypart)
  1111. {
  1112. case BODY_PART_LEFT_LEG:
  1113. {
  1114. ApplyAnimation(playerid, "ped", "DAM_LegL_frmLT", 4.1, 0, 0, 0, 0, 0, 1);
  1115. }
  1116. case BODY_PART_RIGHT_LEG:
  1117. {
  1118. ApplyAnimation(playerid, "ped", "DAM_LegR_frmBK", 4.1, 0, 0, 0, 0, 0, 1);
  1119. }
  1120. case BODY_PART_LEFT_ARM:
  1121. {
  1122. ApplyAnimation(playerid, "ped", "DAM_armL_frmBK", 4.1, 0, 0, 0, 0, 0, 1);
  1123. }
  1124. case BODY_PART_RIGHT_ARM:
  1125. {
  1126. ApplyAnimation(playerid, "ped", "DAM_armR_frmBK", 4.1, 0, 0, 0, 0, 0, 1);
  1127. }
  1128. }
  1129. return 1;
  1130. }
  1131.  
  1132. public StandUp(playerid)
  1133. {
  1134. SetPVarInt(playerid, "optd-hs", 0);
  1135. ApplyAnimation(playerid, "ped", "getup", 4.1, 0, 0, 0, 0, 0, 1);
  1136. }
  1137.  
  1138. public OnPlayerDeath(playerid, killerid, reason)
  1139. {
  1140. #if DEBUG == 1
  1141. printf("%s[%d] OnPlayerDeath - begin", GetNick(playerid), playerid);
  1142. #endif
  1143. new playername[MAX_PLAYER_NAME];
  1144. new killername[MAX_PLAYER_NAME];
  1145. new string[128];
  1146.  
  1147. GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  1148.  
  1149. new bbxid = GetPVarInt(playerid, "boomboxid");
  1150. if(BoomBoxData[bbxid][BBD_Carried]-1 == playerid)
  1151. {
  1152. BoomBoxData[bbxid][BBD_Standby] = false;
  1153. BBD_Putdown(playerid, bbxid);
  1154. }
  1155.  
  1156. if(ZoneAttacker[playerid])
  1157. {
  1158. OnPlayerLeaveGangZone(playerid, GetPVarInt(playerid, "zoneid"));
  1159. }
  1160. else if(ZoneDefender[playerid])
  1161. {
  1162. OnPlayerLeaveGangZone(playerid, GetPVarInt(playerid, "zoneid"));
  1163. }
  1164.  
  1165. //PAŹDZIOCH - lina SWAT
  1166. if(GetPVarInt(playerid,"roped") == 1)
  1167. {
  1168. for(new i=0;i<=ROPELENGTH;i++)
  1169. {
  1170. DestroyDynamicObject(r0pes[playerid][i]);
  1171. }
  1172. SetPVarInt(playerid,"roped",0);
  1173. DisablePlayerCheckpoint(playerid);
  1174. }
  1175.  
  1176. //IBIZA
  1177. if(GetPVarInt(playerid, "IbizaWejdz") || GetPVarInt(playerid, "IbizaBilet") )
  1178. {
  1179. DeletePVar(playerid, "IbizaWejdz");
  1180. DeletePVar(playerid, "IbizaBilet");
  1181. StopAudioStreamForPlayer(playerid); //POWTÓRKA
  1182. }
  1183.  
  1184. //Strefy
  1185. if(killerid != INVALID_PLAYER_ID)
  1186. {
  1187. new frac = GetPlayerFraction(killerid);
  1188.  
  1189. if((IsACop(killerid) && OnDuty[killerid] == 1) || FRAC_GROOVE <= frac <= FRAC_VAGOS || frac == FRAC_WPS || frac == 5 || frac == 6 || frac == 8 || frac == 15 || GetPlayerOrgType(killerid) == ORG_TYPE_GANG || GetPlayerOrgType(killerid) == ORG_TYPE_MAFIA)
  1190. {
  1191. new bool:inzone=false;
  1192. for(new i=0;i<MAX_ZONES;i++)
  1193. {
  1194. if(bInZone[playerid][i])
  1195. {
  1196. if(bInZone[killerid][i])
  1197. {
  1198. inzone=true;
  1199. break;
  1200. }
  1201. }
  1202. }
  1203. if(inzone || GetSVarInt("BW_OnlyGangZones") == 1)
  1204. {
  1205. new Float:x, Float:y, Float:z;
  1206. GetPlayerPos(playerid, x, y, z);
  1207. PlayerInfo[playerid][pBW] = GetSVarInt("BW_Time");
  1208. SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), x, y, z, 0.0, 0, 0, 0, 0, 0, 0);
  1209. SetPVarInt(playerid, "bw-skin", GetPlayerSkin(playerid));
  1210. SetPVarInt(playerid, "bw-vw", GetPlayerVirtualWorld(playerid));
  1211. SetPVarInt(playerid, "bw-int", GetPlayerInterior(playerid));
  1212. }
  1213. }
  1214. }
  1215.  
  1216. if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
  1217. {
  1218. GetPlayerName(playerid, playername, sizeof(playername));
  1219. GetPlayerName(killerid, killername, sizeof(killername));
  1220.  
  1221. //-------<[ Zmienne ]>---------
  1222. StopAudioStreamForPlayer(playerid);
  1223. gPlayerSpawned[playerid] = 0;
  1224. PlayerInfo[playerid][pLocal] = 255;
  1225. PlayerInfo[playerid][pDeaths] ++;
  1226.  
  1227. //-------<[ Antyczity ]>---------
  1228. if(reason <= 54 && reason > 0)
  1229. {
  1230. if(IsPlayerConnected(killerid))
  1231. {
  1232. if(reason == 38 && GetVehicleModel(GetPlayerVehicleID(killerid)) == 425) format(string, sizeof(string), "{FF66CC}DeathWarning: {FFFFFF}%s [%d] zabił %s [%d] z Huntera", killername, killerid, playername, playerid);
  1233. else format(string, sizeof(string), "{FF66CC}DeathWarning: {FFFFFF}%s [%d] zabił %s [%d] z %s", killername, killerid, playername, playerid, (reason <= 46) ? GunNames[reason] : NiggaNames[reason-46]);
  1234. }
  1235. else
  1236. format(string, sizeof(string), "{FF66CC}DeathWarning: %s [%d] umarł (%s)", playername, playerid, (reason <= 46) ? GunNames[reason] : NiggaNames[reason-46]);
  1237. DeWu(string, 1);
  1238. }
  1239. if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
  1240. {
  1241. PlayerInfo[killerid][pKills] ++;
  1242. if(gPlayerLogged[killerid] == 0)
  1243. {
  1244. KickEx(killerid);
  1245. #if DEBUG == 1
  1246. printf("%s[%d] OnPlayerDeath - end", GetNick(playerid), playerid);
  1247. #endif
  1248. return 1;
  1249. }
  1250. if(GetPlayerState(killerid) == 2)
  1251. {
  1252. SendClientMessage(killerid, COLOR_YELLOW, "DriveBy Jest zakazane, Robiąc DriveBy możesz zostać ukarany przez admina!");
  1253. if(PlayerInfo[killerid][pLevel] > 1)
  1254. {
  1255. format(string, 128, "AdmWarning: %s[%d] zabił %s[%d] będą w aucie (możliwe DB/CK2) [Gun %d]!", killername, killerid, playername, playerid, reason);
  1256. ABroadCast(COLOR_YELLOW,string,1);
  1257. WarningLog(string);
  1258. }
  1259. else
  1260. {
  1261. format(string, 128, "AdmWarning: %s[%d] zabił %s[%d] z DB, dostał kicka !", killername, killerid, playername, playerid);
  1262. ABroadCast(COLOR_YELLOW,string,1);
  1263. WarningLog(string);
  1264. SendClientMessage(killerid, COLOR_PANICRED, "Dostałeś kicka za Drive-By do ludzi.");
  1265. KickEx(killerid);
  1266. #if DEBUG == 1
  1267. printf("%s[%d] OnPlayerDeath - end", GetNick(playerid), playerid);
  1268. #endif
  1269. return 1;
  1270. }
  1271. }
  1272. if(reason == 38 && GetVehicleModel(GetPlayerVehicleID(killerid)) != 425)
  1273. {
  1274. format(string, 128, "AdmWarning: [%d]%s zabił gracza %s z miniguna, podejrzane !", killerid, killername, playername);
  1275. ABroadCast(COLOR_YELLOW,string,1);
  1276. CzitLog(string);
  1277. }
  1278. if(reason == 41)
  1279. {
  1280. format(string, 128, "AdmWarning: [%d]%s zabił gracza %s ze spreya !", killerid, killername, playername);
  1281. ABroadCast(COLOR_YELLOW,string,1);
  1282. WarningLog(string);
  1283. }
  1284.  
  1285.  
  1286. //-------<[ Inne ]>---------
  1287. if(PlayerPaintballing[playerid] != 0)
  1288. {
  1289. PlayerPaintballKills[killerid] ++;
  1290. if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
  1291. {
  1292. PaintballWinner = killerid;
  1293. PaintballWinnerKills = PlayerPaintballKills[killerid];
  1294. foreach(Player, i)
  1295. {
  1296. if(IsPlayerConnected(i))
  1297. {
  1298. if(PlayerPaintballing[i] != 0)
  1299. {
  1300. format(string, sizeof(string), "* %s jest na prowadzeniu z %d trafieniami.",killername,PaintballWinnerKills);
  1301. SendClientMessage(i, COLOR_WHITE, string);
  1302. }
  1303. }
  1304. }
  1305. }
  1306. #if DEBUG == 1
  1307. printf("%s[%d] OnPlayerDeath - end", GetNick(playerid), playerid);
  1308. #endif
  1309. return 1;
  1310. }
  1311. if(PlayerInfo[playerid][pHeadValue] > 0)
  1312. {
  1313. if(IsPlayerConnected(killerid))
  1314. {
  1315. if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLider] == 8)
  1316. {
  1317. if(GoChase[killerid] == playerid)
  1318. {
  1319. ConsumingMoney[killerid] = 1;
  1320. DajKase(killerid, PlayerInfo[playerid][pHeadValue]);
  1321. format(string,128,"<< Hitman %s wypełnił kontrakt na: %s i zarobił $%d >>",killername,playername,PlayerInfo[playerid][pHeadValue]);
  1322. SendFamilyMessage(8, COLOR_YELLOW, string);
  1323. PayLog(string);
  1324. format(string,128,"NR Marcepan_Marks: Szok! Zamach na życie %s . Został on ciężko ranny i przewieziony do szpitala.",playername);
  1325. SendClientMessageToAll(COLOR_NEWS, string);
  1326. PlayerInfo[playerid][pHeadValue] = 0;
  1327. GotHit[playerid] = 0;
  1328. GetChased[playerid] = 999;
  1329. GoChase[killerid] = 999;
  1330. }
  1331. }
  1332. }
  1333. }
  1334. }//koniec killerid connected
  1335. if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
  1336. {
  1337. DisablePlayerCheckpoint(playerid);
  1338. gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  1339. }
  1340. new caller = Mobile[playerid];
  1341. if(caller != 255)
  1342. {
  1343. if(caller < 255)
  1344. {
  1345. SendClientMessage(caller, COLOR_GRAD2, "Połączenie zakończone....");
  1346. Callin[playerid] = 0;
  1347. Callin[caller] = 0;
  1348. CellTime[caller] = 0;
  1349. CellTime[playerid] = 0;
  1350. Mobile[caller] = 1255;
  1351. }
  1352. Mobile[playerid] = 1255;
  1353. CellTime[playerid] = 0;
  1354. }
  1355. if(ScigaSie[playerid] != 666 && IloscCH[playerid] != 0)
  1356. {
  1357. format(string, sizeof(string), "Wyścig: {FFFFFF}%s zginął jak prawdziwy ścigant [*]", playername);
  1358. WyscigMessage(COLOR_YELLOW, string);
  1359. IloscZawodnikow --;
  1360. if(IloscZawodnikow <= Ukonczyl)
  1361. {
  1362. KoniecWyscigu(-1);
  1363. }
  1364. }
  1365. if(SkutyGracz[playerid] != 0)
  1366. {
  1367. PDkuje[SkutyGracz[playerid]] = 0;
  1368. zakuty[SkutyGracz[playerid]] = 0;
  1369. SkutyGracz[playerid] = 0;
  1370. }
  1371. if(lowcaz[playerid] == killerid)
  1372. {
  1373. lowcaz[playerid] = 501;
  1374. _MruGracz(playerid, "Zlecenie zostało anulowane - nie możesz wziąć teraz zlecenia na tego samego gracza!");
  1375. }
  1376.  
  1377.  
  1378. //-------<[ WL ]>---------
  1379. if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
  1380. {
  1381. if(!IsACop(killerid) && lowcaz[killerid] != playerid )
  1382. {
  1383. format(string, sizeof(string), "Morderstwo");
  1384. if(IsACop(playerid))
  1385. {
  1386. PoziomPoszukiwania[killerid] += 2;
  1387. strcat(string, " Policjanta");
  1388. }
  1389. if(lowcaz[killerid] == playerid)
  1390. strcat(string, " Łowcy Nagród");
  1391. if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER || GetPlayerState(killerid) == PLAYER_STATE_PASSENGER)
  1392. strcat(string, " z okna pojazdu");
  1393.  
  1394. PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
  1395. PoziomPoszukiwania[killerid] ++;
  1396. SetPlayerCriminal(killerid, INVALID_PLAYER_ID, string);
  1397. }
  1398. }
  1399. }
  1400. SetPlayerColor(playerid,COLOR_GRAD2);
  1401. #if DEBUG == 1
  1402. printf("%s[%d] OnPlayerDeath - end", GetNick(playerid), playerid);
  1403. #endif
  1404. return 1;
  1405. }
  1406.  
  1407. public OnPlayerSpawn(playerid) //Przebudowany
  1408. {
  1409. #if DEBUG == 1
  1410. printf("%s[%d] OnPlayerSpawn - begin", GetNick(playerid), playerid);
  1411. #endif
  1412. //Czyszczenie zmiennych
  1413. //Update3DTextLabelText(PlayerInfo[playerid][pDescLabel], 0xBBACCFFF, "");
  1414.  
  1415. if(GetPVarInt(playerid, "class-sel")) DeletePVar(playerid, "class-sel");
  1416. DeletePVar(playerid, "Vinyl-bilet");
  1417. DeletePVar(playerid, "Vinyl-VIP");
  1418. PlayerInfo[playerid][pMuted] = 0;
  1419. WnetrzeWozu[playerid] = 0;
  1420. spamwl[playerid] = 0;
  1421.  
  1422. SetWeatherEx(ServerWeather);//Pogoda
  1423. //Diler Broni
  1424. if(PlayerInfo[playerid][pJob] == 9 && !IsADilerBroni(playerid))
  1425. {
  1426. PlayerInfo[playerid][pJob] = 0;
  1427. _MruGracz(playerid, "Zostałeś wyrzucony z pracy!");
  1428. }
  1429. // usuwanie
  1430. if(PlayerInfo[playerid][pRank] == 99 && PlayerInfo[playerid][pMember] == 99) {
  1431. PlayerInfo[playerid][pRank] = 0;
  1432. PlayerInfo[playerid][pMember] = 0;
  1433. gTeam[playerid] = 3;
  1434. PlayerInfo[playerid][pTeam] = 3;
  1435. PlayerInfo[playerid][pMember] = 0;
  1436. PlayerInfo[playerid][pRank] = 0;
  1437. PlayerInfo[playerid][pSkin] = 0;
  1438. PlayerInfo[playerid][pTajniak] = 0;
  1439. MruMySQL_SetAccInt("Rank", GetNick(playerid), 0);
  1440. MruMySQL_SetAccInt("Member", GetNick(playerid), 0);
  1441. UsunBron(playerid);
  1442. sendTipMessageEx(playerid, COLOR_LIGHTBLUE, "Zostałeś wyrzucony z pracy przez lidera, gdy byłeś offline!");
  1443. }
  1444. SetPVarInt(playerid, "mozeUsunacBronie", 0);
  1445. // zabieranie prawka //
  1446. new string[128];
  1447. if(PlayerInfo[playerid][pPK] > 24) {
  1448. format(string, sizeof(string), "Przekroczyłeś limit 24 PK. Tracisz prawo jazdy na 1 DZIEŃ");
  1449. _MruGracz(playerid, string);
  1450. //86400
  1451. PlayerInfo[playerid][pPK] = 0;
  1452. PlayerInfo[playerid][pCarLic] = gettime()+86400;
  1453. }
  1454. //Skills'y broni
  1455. SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
  1456. SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1000);
  1457. SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
  1458. SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 500);
  1459. SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
  1460.  
  1461. //Style walki
  1462. if(PlayerInfo[playerid][pStylWalki] == 1) SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
  1463. else if(PlayerInfo[playerid][pStylWalki] == 2) SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
  1464. else if(PlayerInfo[playerid][pStylWalki] == 3) SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
  1465.  
  1466. //Dźwięki
  1467. StopAudioStreamForPlayer(playerid);
  1468. PlayerFixRadio(playerid);
  1469.  
  1470. //Kubi
  1471. INT_AirTowerLS_Exit(playerid, false, true);
  1472.  
  1473. //Inne
  1474. if(PlayerInfo[playerid][pDom] != 0)
  1475. Dom[PlayerInfo[playerid][pDom]][hData_DD] = 0; //Zerowanie dni do usunięcia domu
  1476. SetPlayerToTeamColor(playerid);
  1477.  
  1478. //SetPlayerSpawn:
  1479. SetPlayerSpawn(playerid);
  1480.  
  1481. if(PlayerInfo[playerid][pLider] == FRAC_SN)
  1482. {
  1483. SetPVarInt(playerid, "scena-allow", 1);
  1484. }
  1485.  
  1486. #if DEBUG == 1
  1487. printf("%s[%d] OnPlayerSpawn - end", GetNick(playerid), playerid);
  1488. #endif
  1489. return 1;
  1490. }
  1491.  
  1492. SetPlayerSpawn(playerid)
  1493. {
  1494. SetPlayerSpawnPos(playerid);
  1495. SetPlayerSpawnSkin(playerid);
  1496. SetPlayerSpawnWeapon(playerid);
  1497. return 1;
  1498. }
  1499.  
  1500. SetPlayerSpawnPos(playerid)
  1501. {
  1502. //Po /spec off
  1503. if(Unspec[playerid][Coords][0] != 0.0 && Unspec[playerid][Coords][1] != 0.0 && Unspec[playerid][Coords][2] != 0.0)
  1504. {
  1505. if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pZG] > 0 || PlayerInfo[playerid][pNewAP] >= 1)
  1506. {
  1507. SetPlayerPosEx(playerid, Unspec[playerid][Coords][0], Unspec[playerid][Coords][1], Unspec[playerid][Coords][2]);
  1508. SetPlayerInterior(playerid, Unspec[playerid][sPint]);
  1509. SetPlayerVirtualWorld(playerid, Unspec[playerid][sPvw]);
  1510. Unspec[playerid][Coords][0] = 0.0, Unspec[playerid][Coords][1] = 0.0, Unspec[playerid][Coords][2] = 0.0;
  1511. Spectate[playerid] = INVALID_PLAYER_ID;
  1512. PhoneOnline[playerid] = 0;
  1513. }
  1514. }
  1515. //Tutorial:
  1516. else if(PlayerInfo[playerid][pTut] == 0)
  1517. {
  1518. gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
  1519. TogglePlayerControllable(playerid, 0);
  1520. RegistrationStep[playerid] = 1;
  1521. SetPlayerPosEx(playerid, 1275.0283203125, -1337.3585205078, -5.0);
  1522. SetPlayerCameraPos(playerid, 1275.0283203125, -1337.3585205078, 10.852507591248);// kamera
  1523. SetPlayerCameraLookAt(playerid, 1235.1977539063, -1341.1885986328, 54.349945068359);// patrz
  1524. _MruGracz(playerid, "Witaj na Mrucznik Role Play!");
  1525. _MruGracz(playerid, "Aby zacząć grę musisz przejść procedury rejestracji.");
  1526. ShowPlayerDialogEx(playerid, 70, DIALOG_STYLE_MSGBOX, "Witaj na Mrucznik Role Play", "Witaj na serwerze Mrucznik Role Play\nJeśli jesteś tu nowy, to przygotowaliśmy dla ciebie poradnik\nZa chwilę będziesz mógł go obejrzeć, lecz najpierw będziesz musiał opisać postać którą będziesz sterował\nAby przejść dalej wciśnij przycisk 'dalej'", "Dalej", "");
  1527. }
  1528. //Więzienie:
  1529. else if(PlayerInfo[playerid][pJailed] == 1)
  1530. {
  1531. SetPlayerInterior(playerid, 0);
  1532. SetPlayerVirtualWorld(playerid, 1);
  1533. new losuj= random(sizeof(Cela));
  1534. SetPlayerPosEx(playerid, Cela[losuj][0], Cela[losuj][1], Cela[losuj][2]);
  1535. _MruGracz(playerid, "Twój wyrok nie dobiegł końca, wracasz do więzienia.");
  1536. TogglePlayerControllable(playerid, 0);
  1537. Wchodzenie(playerid);
  1538. }
  1539. else if(PlayerInfo[playerid][pJailed] == 2)
  1540. {
  1541. _MruGracz(playerid, "Twój wyrok nie dobiegł końca, wracasz do więzienia stanowego");
  1542. JailDeMorgan(playerid);
  1543. }
  1544. else if(PlayerInfo[playerid][pJailed] == 3)
  1545. {
  1546. SetPlayerInterior(playerid, 0);
  1547. SetPlayerPosEx(playerid,1481.1666259766,-1790.2204589844,156.7875213623);
  1548. PlayerInfo[playerid][pMuted] = 1;
  1549. SetPlayerVirtualWorld(playerid, 1000+playerid);
  1550. _MruGracz(playerid, "Grałeś NON-RP. Wracasz do Admin Jaila.");
  1551. }
  1552. else if(PlayerInfo[playerid][pJailed] == 10)
  1553. {
  1554. new string[256];
  1555. new kaseczka = (kaska[playerid] > 0) ? (kaska[playerid]/2) : 1;
  1556. new sendername[MAX_PLAYER_NAME];
  1557. GetPlayerName(playerid, sendername, sizeof(sendername));
  1558. format(string, sizeof(string), "Zostałeś uwieziony w Admin Jailu przez Admina Marcepan_Marks. Powod: /q podczas akcji");
  1559. _MruGracz(playerid, string);
  1560. ResetPlayerWeapons(playerid);
  1561. UsunBron(playerid);
  1562. PlayerInfo[playerid][pJailed] = 3;
  1563. PlayerInfo[playerid][pJailTime] = 15*60;
  1564. SetPlayerVirtualWorld(playerid, 1000+playerid);
  1565. PlayerInfo[playerid][pMuted] = 1;
  1566. SetPlayerPosEx(playerid, 1481.1666259766,-1790.2204589844,156.7875213623);
  1567. format(string, sizeof(string), "Zostałeś ukarany na 15 minut. Powod: /q podczas akcji");
  1568. _MruGracz(playerid, string);
  1569. format(string, sizeof(string), "AdmCmd: %s zostal uwieziony w 'AJ' przez Admina Marcepan_Marks. Powod: /q podczas akcji + zabieram połowę kasy i broń", sendername);
  1570. SendClientMessageToAll(COLOR_LIGHTRED, string);
  1571. format(string, sizeof(string), "Dodatkowo zabrano z twojego portfela %d$ i wyzerowano twoje bronie oraz zabrano połowę matsów", kaseczka);
  1572. _MruGracz(playerid, string);
  1573. format(string, sizeof(string),"%s dal /q podczas akcji i zabrano mu %d$ i %d mats oraz bronie", sendername, kaseczka, PlayerInfo[playerid][pMats]/2);
  1574. PayLog(string);
  1575. ZabierzKase(playerid, kaseczka);
  1576. PlayerInfo[playerid][pMats] = PlayerInfo[playerid][pMats]/2;
  1577. }
  1578. //Paintball
  1579. else if(PlayerPaintballing[playerid] != 0)
  1580. {
  1581. ResetPlayerWeapons(playerid);
  1582. GivePlayerWeapon(playerid, 29, 999);
  1583. new rand = random(sizeof(PaintballSpawns));
  1584. SetPlayerPosEx(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
  1585. SetCameraBehindPlayer(playerid);
  1586. }
  1587. //BW:
  1588. else if(PlayerInfo[playerid][pBW] >= 1)
  1589. {
  1590. MedicBill[playerid] = 0;
  1591. MedicTime[playerid] = 0;
  1592. NeedMedicTime[playerid] = 0;
  1593. SetPlayerHealth(playerid, 10.0);
  1594. SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "bw-vw"));
  1595. SetPlayerInterior(playerid, GetPVarInt(playerid, "bw-int"));
  1596. SetPlayerPosEx(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  1597. TogglePlayerControllable(playerid, 0);
  1598. ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.1, 0, 0, 0, 0, 0, 1);
  1599. GameTextForPlayer(playerid, "Zostales brutalnie pobity!", 15000, 5);
  1600. PlayerInfo[playerid][pMuted] = 1;
  1601. if(GetPVarInt(playerid, "bw-skin") != 0) SetPlayerSkin(playerid, GetPVarInt(playerid, "bw-skin"));
  1602.  
  1603. }
  1604. else
  1605. {
  1606. //-----------------------------------[ Normalny spawn ]-----------------------------------
  1607. //Przywracanie do poprzedniego spawnu
  1608. if(GetPVarInt(playerid, "spawn") == 2)
  1609. {
  1610. SetPlayerPosEx(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  1611. SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  1612. SetPlayerVirtualWorld(playerid, 0);
  1613. TogglePlayerControllable(playerid, 1);
  1614. }
  1615. else
  1616. {
  1617. if(PlayerInfo[playerid][pSpawn] == 0) //Normalny spawn
  1618. {
  1619. SetPlayerInteriorEx(playerid, 0);
  1620. PlayerInfo[playerid][pLocal] = 255;
  1621. if(GetPlayerFraction(playerid) > 0) //Spawn Frakcji
  1622. {
  1623. switch(GetPlayerFraction(playerid))
  1624. {
  1625. case FRAC_LSPD: //1
  1626. {
  1627. new rand = random(sizeof(gCopPlayerSpawns));
  1628. SetPlayerPosEx(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]);
  1629. SetPlayerFacingAngle(playerid, 90.0);
  1630. }
  1631. case FRAC_FBI: //2
  1632. {
  1633. if(PlayerInfo[playerid][pTajniak] == 0)
  1634. {
  1635. SetPlayerPosEx(playerid, 598.2130,-1491.1135,15.1351);
  1636. SetPlayerFacingAngle(playerid, 270.0);
  1637. }
  1638. else if(PlayerInfo[playerid][pTajniak] == 1)
  1639. {
  1640. SetPlayerPosEx(playerid, 2495.2163,-1687.2322,13.5150);
  1641. }
  1642. else if(PlayerInfo[playerid][pTajniak] == 2)
  1643. {
  1644. SetPlayerPosEx(playerid, 1939.1940,-1116.3353,27.0151);
  1645. }
  1646. else if(PlayerInfo[playerid][pTajniak] == 3)
  1647. {
  1648. SetPlayerPosEx(playerid, 738.8827,-1429.9484,13.5234);
  1649. }
  1650. else if(PlayerInfo[playerid][pTajniak] == 4)
  1651. {
  1652. SetPlayerPosEx(playerid, 2801.0273,-1089.4576,30.7188);
  1653. }
  1654. else if(PlayerInfo[playerid][pTajniak] == 5)
  1655. {
  1656. SetPlayerPosEx(playerid, 2467.5117,-1278.2054,29.9264);
  1657. }
  1658. else if(PlayerInfo[playerid][pTajniak] == 6)
  1659. {
  1660. new rand = random(sizeof(gTajniakSpawn));
  1661. SetPlayerPosEx(playerid, gTajniakSpawn[rand][0], gTajniakSpawn[rand][1], gTajniakSpawn[rand][2]); // Warp the player
  1662. SetPlayerFacingAngle(playerid, 270.0);
  1663. }
  1664. else
  1665. {
  1666. SetPlayerPosEx(playerid, 2467.5117,-1278.2054,29.9264);
  1667. }
  1668.  
  1669. }
  1670. case FRAC_NG: //3
  1671. {
  1672. SetPlayerPosEx(playerid, 261.8342, 71.2429, 1003.2422);// stara: 2515.0200, -2459.5896, 13.8187
  1673. SetPlayerInterior(playerid, 6);
  1674. SetPlayerVirtualWorld(playerid, 88);
  1675. Wchodzenie(playerid);
  1676. }
  1677. case FRAC_LSMC: //4
  1678. {
  1679. SetPlayerPosEx(playerid, 1148.4323,-1315.4225,13.9841);
  1680. SetPlayerFacingAngle(playerid,358.0);
  1681. }
  1682. case FRAC_LCN: //5
  1683. {
  1684. SetPlayerPosEx(playerid, 738.8827,-1429.9484,13.5234);
  1685. }
  1686. case FRAC_YKZ: //6
  1687. {
  1688. SetPlayerPosEx(playerid, 2794.8042,-1087.1310,30.7188);
  1689. }
  1690. case FRAC_BOR: //7
  1691. {
  1692. SetPlayerPosEx(playerid, 1799.4161,-1577.8551,14.0733);
  1693. }
  1694. case FRAC_HA: //8
  1695. {
  1696. SetPlayerPosEx(playerid, -50.400001525879,-279.20001220703,6.0999999046326);
  1697. }
  1698. case FRAC_SN: //9
  1699. {
  1700. SetPlayerPosEx(playerid, 735.2266,-1336.5826,13.5358);
  1701. }
  1702. case FRAC_KT: //10
  1703. {
  1704. SetPlayerPosEx(playerid, 2482.7566, -2105.6033, 32.2773);
  1705. SetPlayerVirtualWorld(playerid,3);
  1706. Wchodzenie(playerid);
  1707. }
  1708. case FRAC_GOV: //11
  1709. {
  1710. if(PlayerInfo[playerid][pLider] == 11)
  1711. {
  1712. SetPlayerPosEx(playerid, 1473.4933,-1804.0272,163.5459);
  1713. SetPlayerVirtualWorld(playerid,60);
  1714. PlayerInfo[playerid][pLocal] = 108;
  1715. Wchodzenie(playerid);
  1716. }
  1717. else
  1718. {
  1719. if(SchoolSpawn[playerid] == 0)
  1720. {
  1721. SetPlayerPosEx(playerid, 1407.7435,-1788.1862,13.5469);
  1722. SetPlayerFacingAngle(playerid, 0.0);
  1723. }
  1724. else
  1725. {
  1726. SetPlayerPosEx(playerid, 414.4144,2531.9580,19.1565);
  1727. SetPlayerFacingAngle(playerid, 4.6505);
  1728. }
  1729. }
  1730. }
  1731. case FRAC_GROOVE: //12
  1732. {
  1733. SetPlayerPosEx(playerid, 2495.2163,-1687.2322,13.5150);
  1734. }
  1735. case FRAC_BALLAS: //13
  1736. {
  1737. SetPlayerPosEx(playerid,2502.7222,-1244.7454,35.4519);
  1738. SetPlayerFacingAngle(playerid, 181.7818);
  1739. }
  1740. case FRAC_VAGOS: //14
  1741. {
  1742. SetPlayerPosEx(playerid, 2177.1636,-984.1085,64.4688);
  1743. SetPlayerFacingAngle(playerid, 165.360);
  1744. }
  1745. case FRAC_NOA: //15
  1746. {
  1747. SetPlayerPosEx(playerid, 1104.4066,-1224.0862,15.8435);
  1748. SetPlayerFacingAngle(playerid, 181.0);
  1749. }
  1750. case FRAC_WPS: //16
  1751. {
  1752. SetPlayerPosEx(playerid, 2508.0671,-2019.8987,13.9482);
  1753. }
  1754. case FRAC_LSFD: //17
  1755. {
  1756. SetPlayerPosEx(playerid, 1757.6122,-1123.4604,227.8059);
  1757. SetPlayerVirtualWorld(playerid, 22);
  1758. SetPlayerFacingAngle(playerid,180.0);
  1759. Wchodzenie(playerid);
  1760. }
  1761. }
  1762. }
  1763. else if(GetPlayerOrg(playerid) > 0) //Spawn Organizacji
  1764. {
  1765. new org = gPlayerOrg[playerid];
  1766. if(OrgInfo[org][o_Spawn][0] != 0.0)
  1767. {
  1768. SetPlayerVirtualWorld(playerid, OrgInfo[org][o_VW]);
  1769. SetPlayerInteriorEx(playerid, OrgInfo[org][o_Int]);
  1770. SetPlayerPosEx(playerid, OrgInfo[org][o_Spawn][0], OrgInfo[org][o_Spawn][1], OrgInfo[org][o_Spawn][2]);
  1771. SetPlayerFacingAngle(playerid, OrgInfo[org][o_Spawn][3]);
  1772. }
  1773. else
  1774. {
  1775. _MruGracz(playerid, "Twoja rodzina nie ma jeszcza spawnu - spawnujesz się jako cywil");
  1776. new rand = random(sizeof(gRandomPlayerSpawns));
  1777. SetPlayerPosEx(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
  1778. SetPlayerFacingAngle(playerid, gRandomPlayerSpawns[rand][3]);
  1779. }
  1780. }
  1781. else if(PlayerInfo[playerid][pJob] > 0) //Spawn Prac
  1782. {
  1783. switch(PlayerInfo[playerid][pJob])
  1784. {
  1785. case JOB_MECHANIC:
  1786. {
  1787. SetPlayerPosEx(playerid,2794.5515,-1619.3689,10.9219);
  1788. SetPlayerFacingAngle(playerid, 80.0);
  1789. }
  1790. case JOB_LAWYER:
  1791. {
  1792. SetPlayerPosEx(playerid,319.72470092773, -1548.3374023438, 13.845289230347);
  1793. SetPlayerFacingAngle(playerid, 230.0);
  1794. }
  1795. case JOB_LOWCA:
  1796. {
  1797. SetPlayerPosEx(playerid,322.0553894043, 303.41961669922, 999.1484375);
  1798. SetPlayerInterior(playerid,5);
  1799. }
  1800. case JOB_BOXER:
  1801. {
  1802. SetPlayerPosEx(playerid,766.0804,14.5133,1000.7004);
  1803. SetPlayerInterior(playerid, 5);
  1804. }
  1805. case JOB_TRUCKER:
  1806. {
  1807. SetPlayerPosEx(playerid, 1751.4445, -2054.9761, 13.0593);
  1808. SetPlayerFacingAngle(playerid, 180.0);
  1809. }
  1810. case JOB_BUSDRIVER:
  1811. {
  1812. SetPlayerPosEx(playerid, 1143.0999755859,-1754.0999755859,13.60000038147);
  1813. }
  1814. /*case JOB_BODYGUARD:
  1815. {
  1816. }*/
  1817. default:
  1818. {
  1819. new rand = random(sizeof(gRandomPlayerSpawns));
  1820. SetPlayerPosEx(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
  1821. SetPlayerFacingAngle(playerid, gRandomPlayerSpawns[rand][3]);
  1822. }
  1823. }
  1824. }
  1825. else //Spawn cywila
  1826. {
  1827. new rand = random(sizeof(gRandomPlayerSpawns));
  1828. SetPlayerPosEx(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
  1829. SetPlayerFacingAngle(playerid, gRandomPlayerSpawns[rand][3]);
  1830. }
  1831. }
  1832. else if(PlayerInfo[playerid][pSpawn] == 1) //Spawn przed domem
  1833. {
  1834. new i;
  1835. if(PlayerInfo[playerid][pDom] != 0)
  1836. i = PlayerInfo[playerid][pDom];
  1837. else if(PlayerInfo[playerid][pWynajem] != 0)
  1838. i = PlayerInfo[playerid][pWynajem];
  1839. else
  1840. {
  1841. PlayerInfo[playerid][pSpawn] = 0;
  1842. SetPlayerSpawnPos(playerid);
  1843. return 1;
  1844. }
  1845. SetPlayerPosEx(playerid, Dom[i][hWej_X], Dom[i][hWej_Y], Dom[i][hWej_Z]);
  1846. }
  1847. else if(PlayerInfo[playerid][pSpawn] == 2) //Spawn w środku domu
  1848. {
  1849. new i, h, m;
  1850. if(PlayerInfo[playerid][pDom] != 0)
  1851. i = PlayerInfo[playerid][pDom];
  1852. else if(PlayerInfo[playerid][pWynajem] != 0)
  1853. i = PlayerInfo[playerid][pWynajem];
  1854. else
  1855. {
  1856. PlayerInfo[playerid][pSpawn] = 0;
  1857. SetPlayerSpawnPos(playerid);
  1858. return 1;
  1859. }
  1860. GetPlayerTime(playerid, h, m);
  1861. SetPlayerTime(playerid, Dom[i][hSwiatlo], 0);
  1862. PlayerInfo[playerid][pDomT] = h;
  1863. PlayerInfo[playerid][pDomWKJ] = PlayerInfo[playerid][pDom];
  1864. SetPlayerPosEx(playerid, Dom[i][hInt_X], Dom[i][hInt_Y], Dom[i][hInt_Z]);
  1865. SetPlayerInteriorEx(playerid, Dom[i][hInterior]);
  1866. SetPlayerVirtualWorld(playerid, Dom[i][hVW]);
  1867. GameTextForPlayer(playerid, "~g~Witamy w domu", 5000, 1);
  1868. }
  1869. }
  1870. }
  1871.  
  1872. //Ustawienie kamery:
  1873. if(GetPVarInt(playerid, "spawn"))
  1874. DeletePVar(playerid, "spawn");
  1875. SetCameraBehindPlayer(playerid);
  1876. return 1;
  1877. }
  1878.  
  1879. SetPlayerSpawnWeapon(playerid)
  1880. {
  1881. //Resetowanie broni
  1882. ResetPlayerWeapons(playerid);
  1883.  
  1884. //Dawanie spawnowych broni
  1885. if(GetPlayerFraction(playerid))
  1886. DajBronieFrakcyjne(playerid);
  1887. if(GetPlayerOrg(playerid))
  1888. DajBronieOganizacji(playerid);
  1889. if(PlayerInfo[playerid][pJob])
  1890. DajBroniePracy(playerid);
  1891. if(MaZapisanaBron(playerid))
  1892. PrzywrocBron(playerid);
  1893.  
  1894. //HP:
  1895. if(IsACop(playerid) && OnDuty[playerid] == 1 && PlayerInfo[playerid][pTajniak] != 6)
  1896. {
  1897. SetPlayerHealth(playerid, 90);
  1898. //f(PlayerInfo[playerid][pMember] != 1 || PlayerInfo[playerid][pLider] != 1)
  1899. //SetPlayerArmour(playerid, 15);
  1900. }
  1901. else if(IsAPrzestepca(playerid))
  1902. {
  1903. SetPlayerHealth(playerid, 90);
  1904. //SetPlayerArmour(playerid, 15);
  1905. }
  1906. else
  1907. {
  1908. SetPlayerHealth(playerid, 90);
  1909. }
  1910. return 1;
  1911. }
  1912.  
  1913. SetPlayerSpawnSkin(playerid)
  1914. {
  1915. if(PlayerInfo[playerid][pChar] > 0)
  1916. PlayerInfo[playerid][pSkin] = PlayerInfo[playerid][pChar], PlayerInfo[playerid][pChar] = 0;
  1917.  
  1918. if(GetPlayerFraction(playerid) == FRAC_FBI && PlayerInfo[playerid][pTajniak] != 0)
  1919. {
  1920. if(PlayerInfo[playerid][pRank] < 4)
  1921. PlayerInfo[playerid][pTajniak] =0;
  1922. else
  1923. {
  1924. switch(PlayerInfo[playerid][pTajniak])
  1925. {
  1926. case 1:
  1927. {
  1928. SetPlayerSkin(playerid, 107);
  1929. }
  1930. case 2:
  1931. {
  1932. SetPlayerSkin(playerid, 104);
  1933. }
  1934. case 3:
  1935. {
  1936. SetPlayerSkin(playerid, 124);
  1937. }
  1938. case 4:
  1939. {
  1940. SetPlayerSkin(playerid, 123);
  1941. }
  1942. case 5:
  1943. {
  1944. SetPlayerSkin(playerid, 108);
  1945. }
  1946. case 6:
  1947. {
  1948. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1949. }
  1950. }
  1951. return 1;
  1952. }
  1953. }
  1954.  
  1955. if(PlayerInfo[playerid][pSkin] != 0)
  1956. {
  1957. if(GetPlayerFraction(playerid) != 0)
  1958. {
  1959. if(IsACop(playerid) || GetPlayerFraction(playerid) == FRAC_LSFD || GetPlayerFraction(playerid) == FRAC_LSMC)
  1960. {
  1961. if(OnDuty[playerid] == 1 && OnDutyCD[playerid] == 0)
  1962. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  1963. else
  1964. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1965. }
  1966. else if(GetPlayerFraction(playerid) == FRAC_SN)
  1967. {
  1968. if(SanDuty[playerid] == 1)
  1969. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  1970. else
  1971. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1972. }
  1973. else
  1974. {
  1975. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1976. SetPVarInt(playerid, "skinF", 0);
  1977. }
  1978. }
  1979. else if(GetPlayerOrg(playerid) != 0)
  1980. {
  1981. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  1982. }
  1983. else if(JobDuty[playerid] == 1)
  1984. {
  1985. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  1986. }
  1987. }
  1988. else
  1989. {
  1990. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1991. SetPVarInt(playerid, "skinF", 0);
  1992. }
  1993.  
  1994. return 1;
  1995. }
  1996.  
  1997. public OnPlayerEnterCheckpoint(playerid)
  1998. {
  1999. #if DEBUG == 1
  2000. printf("%s[%d] OnPlayerEnterCheckpoint - begin", GetNick(playerid), playerid);
  2001. #endif
  2002. new string[128];
  2003. new name[MAX_PLAYER_NAME];
  2004. DisablePlayerCheckpoint(playerid);
  2005.  
  2006. //PAŹDZIOCH
  2007. if(GetPVarInt(playerid,"roped") == 1)
  2008. {
  2009. SetPVarInt(playerid,"roped",0);
  2010. SetPVarInt(playerid,"chop_id",0);
  2011. ClearAnimations(playerid);
  2012. TogglePlayerControllable(playerid,0);
  2013. TogglePlayerControllable(playerid,1);
  2014. for(new i=0;i<=ROPELENGTH;i++)
  2015. {
  2016. DestroyDynamicObject(r0pes[playerid][i]);
  2017. }
  2018. }
  2019.  
  2020. TJD_CallCheckpoint(playerid, GetPlayerVehicleID(playerid));
  2021.  
  2022. if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
  2023. {
  2024. TaxiAccepted[playerid] = 999;
  2025. GameTextForPlayer(playerid, "~w~Dotarles do celu", 5000, 1);
  2026. TaxiCallTime[playerid] = 0;
  2027. DisablePlayerCheckpoint(playerid);
  2028. }
  2029. else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] < 999)
  2030. {
  2031. BusAccepted[playerid] = 999;
  2032. GameTextForPlayer(playerid, "~w~Dotarles do celu", 5000, 1);
  2033. BusCallTime[playerid] = 0;
  2034. DisablePlayerCheckpoint(playerid);
  2035. }
  2036. if(CP[playerid]>=550 && CP[playerid]<=999)//Wywołuje otwieranie drzwi gdy jest w CP od 550 do 999
  2037. {
  2038. Otwieramdrzwibusa(playerid);
  2039. }
  2040. if(CP[playerid]==1200)
  2041. {
  2042. _MruGracz(playerid, "Dojechałeś do zajezdni i zakończyłeś pracę.");
  2043. Przystanek(playerid, COLOR_GREEN, "Korporacja Transportowa\n Wydział Komunikacji Autbusowej");
  2044. DisablePlayerCheckpoint(playerid);
  2045. CP[playerid] = 0;
  2046. }
  2047. if(CP[playerid]==1201)
  2048. {
  2049. _MruGracz(playerid, "Dojechałeś do zajezdni i zakończyłeś pracę.");
  2050. Przystanek(playerid, COLOR_YELLOW, "Los Santos Bus Department\n Komunikacja Miejska");
  2051. DisablePlayerCheckpoint(playerid);
  2052. CP[playerid] = 0;
  2053. }
  2054. //Linia numer 55 autobusa SYSTEM AUTOBUSÓW
  2055. if(PlayerInfo[playerid][pLinia55]==1)
  2056. {
  2057. if(CP[playerid]==551) //Sprawdza czy dojechał do nastepnego
  2058. {
  2059.  
  2060. DisablePlayerCheckpoint(playerid); //usuwa cp i...
  2061. _MruGracz(playerid, "|_____________Przypomnienie_____________|");
  2062. _MruGracz(playerid, "Nie zapomnij rozpocząć służby!!!");
  2063. _MruGracz(playerid, "Wpisz {FFFF00}/fare [cena]");
  2064. _MruGracz(playerid, "Jezeli chcesz ruszyć po wjechaniu w przystanek wpisz /zd");
  2065. _MruGracz(playerid, "Jeżeli będziesz chciał przerwać trasę wcześniej wpisz /zakoncztrase");
  2066. _MruGracz(playerid, "|_____________>>/fare<<_____________|");
  2067. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Jefferson - Glen Park - Idlewood - El Corona - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Motel Jefferson");
  2068. ProxDetector(10.0, playerid, "Linia numer: {3333FF}55 (niebieska) {FFFF00} Kierunek ==> {3333FF}MRUCZNIK TOWER", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2069. SetPlayerCheckpoint(playerid, 2248.4707,-1139.6617,25.7001, 4); //... ustawia nastepnego
  2070. CP[playerid]=552; //przypisuje id dla cp
  2071. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2072.  
  2073. }
  2074. else if(CP[playerid]==552)
  2075. {
  2076. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Jefferson – Motel Jefferson", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2077. DisablePlayerCheckpoint(playerid);
  2078. SetPlayerCheckpoint(playerid, 1967.2327,-1198.9353,25.2217, 4);
  2079. CP[playerid]=553;
  2080. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Glen Park - Idlewood - El Corona - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Glen Park");
  2081. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2082. _MruGracz(playerid, "+230$");
  2083. }
  2084. else if(CP[playerid]==553)
  2085. {
  2086. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Glen Park", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2087. DisablePlayerCheckpoint(playerid);
  2088. SetPlayerCheckpoint(playerid, 1844.0139,-1361.4354,12.9694, 4);
  2089. CP[playerid]=554;
  2090. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Idlewood - El Corona - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Skate Park");
  2091. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2092. }
  2093. else if(CP[playerid]==554)
  2094. {
  2095. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Idlewood – Skate Park", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2096. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2097. _MruGracz(playerid, "+230$");
  2098. DisablePlayerCheckpoint(playerid);
  2099. SetPlayerCheckpoint(playerid, 1742.6479,-1816.3966,12.9351, 4);
  2100. CP[playerid]=555;
  2101. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: El Corona - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Unity Station");
  2102. }
  2103. else if(CP[playerid]==555)
  2104. {
  2105. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}El Corona – Unity Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2106. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2107. _MruGracz(playerid, "+230$");
  2108. DisablePlayerCheckpoint(playerid);
  2109. SetPlayerCheckpoint(playerid, 1532.3134,-1648.4254,12.9485, 4); //Przystanek Komisariat
  2110. CP[playerid]=556;
  2111. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Komisariat / Urząd Miasta");
  2112. }
  2113. else if(CP[playerid]==556)
  2114. {
  2115. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Pershing Square – Komisariat / Urząd Miasta", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2116. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2117. _MruGracz(playerid, "+230$");
  2118. DisablePlayerCheckpoint(playerid);
  2119. SetPlayerCheckpoint(playerid, 1452.3877,-1031.1976,23.2277, 4);
  2120. CP[playerid]=557;
  2121. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Downtown - Market - Rodeo\n{808080}Następny przystanek: Verte Bank ");
  2122. }
  2123. else if(CP[playerid]==557)
  2124. {
  2125. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Downtown – Bank", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2126. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2127. _MruGracz(playerid, "+230$");
  2128. DisablePlayerCheckpoint(playerid);
  2129. SetPlayerCheckpoint(playerid, 1008.5986,-1140.0272,23.2408, 4);
  2130. CP[playerid]=558;
  2131. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Market - Rodeo\n{808080}Następny przystanek: Bymber Casino ");
  2132. }
  2133. else if(CP[playerid]==558)
  2134. {
  2135. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Market – Bymber Casino", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2136. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2137. _MruGracz(playerid, "+230$");
  2138. DisablePlayerCheckpoint(playerid);
  2139. SetPlayerCheckpoint(playerid, 836.6970,-1318.8370,12.9458, 4);
  2140. CP[playerid]=559;
  2141. _MruGracz(playerid, "|_____________Komunikat_____________|");
  2142. _MruGracz(playerid, "Na najbliższym skrzyżowaniu W LEWO");
  2143. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2144. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Market - Rodeo\n{808080}Następny przystanek: Market Station");
  2145. }
  2146. else if(CP[playerid]==559)
  2147. {
  2148. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Market Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2149. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2150. _MruGracz(playerid, "+230$");
  2151. DisablePlayerCheckpoint(playerid);
  2152. SetPlayerCheckpoint(playerid, 708.8574,-1391.8915,13.0002, 4);
  2153. CP[playerid]=560;
  2154. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: Centrala SAN");
  2155. }
  2156. else if(CP[playerid]==560)
  2157. {
  2158. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Rodeo- Centrala SAN", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2159. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2160. _MruGracz(playerid, "+230$");
  2161. DisablePlayerCheckpoint(playerid);
  2162. SetPlayerCheckpoint(playerid, 625.2355,-1470.5664,13.9573, 4);
  2163. CP[playerid]=1008;
  2164. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: Główna siedziba FBI (N/Ż)");
  2165. }
  2166. else if(CP[playerid]==1008)
  2167. {
  2168. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Rodeo – Główna siedziba FBI (N/Ż)", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2169. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2170. _MruGracz(playerid, "+230$");
  2171. DisablePlayerCheckpoint(playerid);
  2172. SetPlayerCheckpoint(playerid, 354.7779,-1643.9617,32.4429, 4);
  2173. CP[playerid]=562;
  2174. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \n Kierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: Molo Wędkarskie ");
  2175. }
  2176. else if(CP[playerid]==562)
  2177. {
  2178. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Rodeo – Molo Wędkarskie", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2179. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2180. _MruGracz(playerid, "+230$");
  2181. DisablePlayerCheckpoint(playerid);
  2182. SetPlayerCheckpoint(playerid, 378.3281,-1424.5344,34.2901, 4); //nawrotka CP
  2183. CP[playerid]=1001;
  2184. _MruGracz(playerid, "|_____________Komunikat_____________|");
  2185. _MruGracz(playerid, "Przygotuj się do wykonania NAWROTU");
  2186. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2187. Przystanek(playerid, COLOR_BLUE, "Linia numer 55 \nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: MRUCZNIK TOWER ");
  2188. }
  2189. else if(CP[playerid]==1001)
  2190. {
  2191. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek końcowy {EE82EE}Rodeo – Biurowiec 'Mrucznik Tower'", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2192. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2193. _MruGracz(playerid, "+230$");
  2194. DisablePlayerCheckpoint(playerid);
  2195. SetPlayerCheckpoint(playerid, 341.5396,-1531.1141,32.8992, 4); //CP mrucznik tower
  2196. TogglePlayerControllable(playerid, 1);
  2197. CP[playerid]=563;
  2198. _MruGracz(playerid, "|_____________Komunikat_____________|");
  2199. _MruGracz(playerid, "Za chwilę zbliżysz się do końca trasy! (1/2 zadania).");
  2200. _MruGracz(playerid, "Możesz odpocząć nie wjeżdżając w kolejny checkpoint lub ruszyć dalej.");
  2201. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2202. Przystanek(playerid, COLOR_BLUE, "Linia nr 55 \nKierunek: Kościół\n{778899}Trasa: Rodeo - Market - Downtown - Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Odjazd nastąpi po sygnale");
  2203. }
  2204. else if(CP[playerid]==563)
  2205. {
  2206. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2207. _MruGracz(playerid, "+230$");
  2208. DisablePlayerCheckpoint(playerid);
  2209. SetPlayerCheckpoint(playerid, 359.0248,-1647.8008,32.3386, 4); //molo wędkarskie
  2210. CP[playerid]=564;
  2211. ProxDetector(10.0, playerid, "Linia numer: {3333FF}55 (niebieska) {FFFF00} Kierunek ==> {3333FF}KOŚCIÓŁ", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2212. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Rodeo - Market - Downtown - Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Molo Wędkarskie");
  2213. }
  2214. else if(CP[playerid]==564)
  2215. {
  2216. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Rodeo – Molo Wędkarskie", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2217. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2218. _MruGracz(playerid, "+230$");
  2219. DisablePlayerCheckpoint(playerid);
  2220. SetPlayerCheckpoint(playerid, 639.6337,-1452.6040,13.7631, 4);
  2221. CP[playerid]=1007;
  2222. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Rodeo - Market - Downtown - Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Główna siedziba FBI (N/Ż) ");
  2223. }
  2224. else if(CP[playerid]==1007)
  2225. {
  2226. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Rodeo – Główna siedziba FBI (N/Ż)", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2227. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2228. _MruGracz(playerid, "+230$");
  2229. DisablePlayerCheckpoint(playerid);
  2230. SetPlayerCheckpoint(playerid, 723.2538,-1407.2189,12.9320, 4);
  2231. CP[playerid]=566;
  2232. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Rodeo - Market - Downtown - Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Centrala SAN ");
  2233. }
  2234. else if(CP[playerid]==566)
  2235. {
  2236. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Rodeo- Centrala SAN", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2237. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2238. _MruGracz(playerid, "+230$");
  2239. DisablePlayerCheckpoint(playerid);
  2240. SetPlayerCheckpoint(playerid, 830.8025,-1330.0034,13.5437, 4);
  2241. CP[playerid]=567;
  2242. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Market - Downtown - Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Market Station ");
  2243. }
  2244. else if(CP[playerid]==567)
  2245. {
  2246. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Market Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2247. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2248. _MruGracz(playerid, "+230$");
  2249. DisablePlayerCheckpoint(playerid);
  2250. SetPlayerCheckpoint(playerid, 1034.3179,-1150.8452,23.2292, 4); //Bymber Kasyno
  2251. CP[playerid]=568;
  2252. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Market - Downtown - Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Bymber Casino ");
  2253. }
  2254. else if(CP[playerid]==568)
  2255. {
  2256. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Market – Bymber Casino", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2257. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2258. _MruGracz(playerid, "+230$");
  2259. DisablePlayerCheckpoint(playerid);
  2260. SetPlayerCheckpoint(playerid, 1449.7135,-1037.4396,23.2312, 4); //Bank
  2261. CP[playerid]=569;
  2262. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Downtown - Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Verte Bank ");
  2263. }
  2264. else if(CP[playerid]==569)
  2265. {
  2266. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Downtown – Bank", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2267. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2268. _MruGracz(playerid, "+230$");
  2269. DisablePlayerCheckpoint(playerid);
  2270. SetPlayerCheckpoint(playerid, 1527.9624,-1695.4071,12.9535, 4); //Komisariat LS
  2271. CP[playerid]=570;
  2272. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Urząd Miasta - El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Komisariat / Urząd Miasta ");
  2273. }
  2274. else if(CP[playerid]==570)
  2275. {
  2276. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Pershing Square – Komisariat", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2277. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2278. _MruGracz(playerid, "+230$");
  2279. DisablePlayerCheckpoint(playerid);
  2280. SetPlayerCheckpoint(playerid, 1791.1583,-1833.9706,12.9519, 4);
  2281. CP[playerid]=571;
  2282. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: El Corona - Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Unity Station ");
  2283. }
  2284. else if(CP[playerid]==571)
  2285. {
  2286. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}El Corona – Unity Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2287. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2288. _MruGracz(playerid, "+230$");
  2289. DisablePlayerCheckpoint(playerid);
  2290. SetPlayerCheckpoint(playerid, 1853.2744,-1393.1622,12.9655, 4);
  2291. CP[playerid]=572;
  2292. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Idlewood - Glen Park - Jefferson\n{808080}Następny przystanek: Skate Park ");
  2293. }
  2294. else if(CP[playerid]==572)
  2295. {
  2296. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Idlewood – Skate Park", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2297. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2298. _MruGracz(playerid, "+230$");
  2299. DisablePlayerCheckpoint(playerid);
  2300. SetPlayerCheckpoint(playerid, 1972.9082,-1198.7592,25.2214, 4);
  2301. CP[playerid]=573;
  2302. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Glen Park - Jefferson\n{808080}Następny przystanek: Glen Park ");
  2303. }
  2304. else if(CP[playerid]==573)
  2305. {
  2306. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Glen Park", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2307. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2308. _MruGracz(playerid, "+230$");
  2309. DisablePlayerCheckpoint(playerid);
  2310. SetPlayerCheckpoint(playerid, 2255.2795,-1145.6331,26.0940, 4);
  2311. CP[playerid]=574;
  2312. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Jefferson\n{808080}Następny przystanek: Motel Jefferson ");
  2313. }
  2314. else if(CP[playerid]==574)
  2315. {
  2316. DisablePlayerCheckpoint(playerid);
  2317. SetPlayerCheckpoint(playerid, 2210.0313,-1440.1292,23.3929, 4); //Końcowy CP po drugiej stronie
  2318. CP[playerid]=575;
  2319. ProxDetector(10.0, playerid, "{FFFFFF}Linia 55: {FFFF00}Przystanek {EE82EE}Jefferson – Motel Jefferson", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2320. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2321. _MruGracz(playerid, "+230$");
  2322. Przystanek(playerid, COLOR_BLUE, "Linia nr 55\nKierunek: Kościół\n{778899}Trasa: Jefferson\n{808080}Następny przystanek: KOŚCIÓŁ ");
  2323. }
  2324. else if(CP[playerid]==575)
  2325. {
  2326. if(BusCzit[playerid] == 1)
  2327. {
  2328. KickEx(playerid);
  2329. }
  2330. else
  2331. {
  2332. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Jefferson – Kościół", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2333. DisablePlayerCheckpoint(playerid);
  2334. //TogglePlayerControllable(playerid, 0);//Zamrażamy do póki nie odpowie co robi dalej
  2335. //ShowPlayerDialogEx(playerid, 8888, DIALOG_STYLE_MSGBOX, "Trasa", "Zrobiłeś pełną trasę. Co zamierzasz teraz zrobić?\n\nWciśnij Ponów aby wczytać trasę jeszcze raz.\nWciśnij Inną aby wybrać inną trasę.", "Ponów", "Inną");
  2336. _MruGracz(playerid, "|_____________Trasa linii 55 zakończona!_____________|");
  2337. _MruGracz(playerid, "Otrzymujesz 5980$ premii za dwukrotne przejechanie trasy! (26 przystanków)");
  2338. _MruGracz(playerid, "Możesz znów rozpocząć tą lub inną trasę lub zrezygnować poprzez zamknięcie menu wyboru.");
  2339. _MruGracz(playerid, "Jeżeli jednak chcesz zakończyć pracę kieruj się do zajezdni LSBD (wskazanej przez GPS).");
  2340. _MruGracz(playerid, "|_____________>>Los Santos Bus Department<<_____________|");
  2341. _MruGracz(playerid, "Skill +2");
  2342. PlayerInfo[playerid][pCarSkill] += 2;
  2343. if(GetPlayerFraction(playerid) == FRAC_KT) Sejf_Add(FRAC_KT, 5980);
  2344. else DajKase(playerid, 5980);
  2345. CP[playerid] = 0;
  2346. PlayerInfo[playerid][pLinia55] = 0;
  2347. PlayerInfo[playerid][pNatrasiejest] = 0;
  2348. ShowPlayerDialogEx(playerid, 8155, DIALOG_STYLE_LIST, "Wybierz swój kurs:", "Linia 55 -niebieska (230$/p , 9min, 21p, +2)\nLinia 72- pomarańczowa (200$/p, 6min, 15p, +1)\nLinia 96 - zielona 4s (310$/p, 8min, 24p, +1)\nLinia 82 żółta 5s (510$/p , 11min, 18p, +3)\nLinia 85 3s (270$/p , ? min, 24p, +2)\nWycieczka 5s\nPowrót do bazy\nPomoc", "Wybierz", "Wyjdz");
  2349. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLider] == 10)
  2350. {
  2351. Przystanek(playerid, COLOR_BLUE, "Linia ZAJ\nLinia 55 do zajezdni Ocean Docks\n{778899}Trasa: Idlewood - Willowfield\n{808080}Zatrzymuje się na przystankach");
  2352. SetPlayerCheckpoint(playerid, 2431.2551,-2094.0959,13.5469, 4);
  2353. CP[playerid]=1200;
  2354. }
  2355. else if(PlayerInfo[playerid][pJob] == 10)
  2356. {
  2357. Przystanek(playerid, COLOR_BLUE, "Linia ZAJ\nLinia 55 do zajezdni Commerce\n{778899}Trasa: Idlewood - Pershing Square - Commerce\n{808080}Zatrzymuje się na przystankach");
  2358. SetPlayerCheckpoint(playerid, 1138.5,-1738.3,13.5, 4);
  2359. CP[playerid]=1201;
  2360. }
  2361.  
  2362. }
  2363. }
  2364. }
  2365. // KONIEC LINII 55 AUTOBUSÓW
  2366.  
  2367. //Linia numer 72 autobusa SYSTEM AUTOBUSÓW
  2368. if(PlayerInfo[playerid][pLinia72]==1)
  2369. {
  2370. if(CP[playerid]==721) //Sprawdza czy dojechał do nastepnego
  2371. {
  2372. DisablePlayerCheckpoint(playerid); //usuwa cp i...
  2373. _MruGracz(playerid, "|_____________Przypomnienie_____________|");
  2374. _MruGracz(playerid, "Nie zapomnij rozpocząć służby!!!");
  2375. _MruGracz(playerid, "Wpisz {FFFF00}/fare [cena]");
  2376. _MruGracz(playerid, "Jezeli chcesz ruszyć po wjechaniu w przystanek wpisz /zd");
  2377. _MruGracz(playerid, "Jeżeli będziesz chciał przerwać trasę wcześniej wpisz /zakoncztrase");
  2378. _MruGracz(playerid, "|_____________>>/fare<<_____________|");
  2379. ProxDetector(10.0, playerid, "Linia numer: {FFA500}72 (pomarańczowa) {FFFF00}Kierunek ==> {FFA500}MRUCZNIK TOWER", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2380. SetPlayerCheckpoint(playerid, 2572.6025,-1728.8365,13.3093, 4);
  2381. CP[playerid]=740; //przypisuje id dla cp up
  2382. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Ganton - Idlewood - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Groove Street");
  2383. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);//
  2384. }
  2385. //nowe ganton GS lewo 2471,-1735.9000244141,13.39999961853
  2386. //nowe ganton GS prawy 2590.6999511719,-1728.8000488281,13.39999961853
  2387. else if(CP[playerid]==740)
  2388. {
  2389. DisablePlayerCheckpoint(playerid);
  2390. SetPlayerCheckpoint(playerid, 2297.6785,-1655.4948,14.3767, 4);
  2391. CP[playerid]=1009;
  2392. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Ganton – Groove Street", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2393. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2394. _MruGracz(playerid, "+100$");
  2395. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Ganton - Idlewood - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Bar Ten Green Bottles (N/Ż)");
  2396. }
  2397. else if(CP[playerid]==1009)
  2398. {
  2399. DisablePlayerCheckpoint(playerid);
  2400. SetPlayerCheckpoint(playerid, 2182.5671,-1708.4637,13.4766, 4); //
  2401. CP[playerid]=722;
  2402. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Ganton – Bar Ten Green Bottles (N/Ż)", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2403. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2404. _MruGracz(playerid, "+50$");
  2405. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Idlewood - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Siłownia");
  2406. }
  2407. else if(CP[playerid]==722)
  2408. {
  2409. DisablePlayerCheckpoint(playerid);
  2410. SetPlayerCheckpoint(playerid, 1890.3834,-1749.6218,12.9520, 4);//
  2411. CP[playerid]=723;
  2412. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Idlewood – Siłownia", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2413. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2414. _MruGracz(playerid, "+200$");
  2415. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Idlewood - Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Stacja Benzynowa");
  2416. }
  2417. else if(CP[playerid]==723)
  2418. {
  2419. DisablePlayerCheckpoint(playerid);
  2420. SetPlayerCheckpoint(playerid, 1532.3134,-1648.4254,12.9485, 4);
  2421. CP[playerid]=724;
  2422. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Idlewood – Stacja Benzynowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2423. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2424. _MruGracz(playerid, "+200$");
  2425. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Urząd Miasta - Downtown - Market - Rodeo\n{808080}Następny przystanek: Komisariat / Urząd Miasta ");
  2426. }
  2427. else if(CP[playerid]==724)
  2428. {
  2429. DisablePlayerCheckpoint(playerid);
  2430. SetPlayerCheckpoint(playerid, 1452.3877,-1031.1976,23.2277, 4);
  2431. CP[playerid]=725;
  2432. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Pershing Square – Komisariat / Urząd Miasta", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2433. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2434. _MruGracz(playerid, "+200$");
  2435. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Downtown - Market - Rodeo\n{808080}Następny przystanek: Verte Bank (jedn.) ");
  2436. }
  2437. else if(CP[playerid]==725)
  2438. {
  2439. DisablePlayerCheckpoint(playerid);
  2440. SetPlayerCheckpoint(playerid, 1340.7183,-1346.4941,12.9510, 4); //stacja benz prawa
  2441. CP[playerid]=726;
  2442. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Downtown – Bank (jednokierunkowy)", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2443. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2444. _MruGracz(playerid, "+200$");
  2445. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Downtown - Market - Rodeo\n{808080}Następny przystanek: Ammu-Nation (jedn.)");
  2446. }
  2447. else if(CP[playerid]==726)
  2448. {
  2449. DisablePlayerCheckpoint(playerid);
  2450. SetPlayerCheckpoint(playerid, 1208.1235,-1314.7834,12.9645, 4);
  2451. CP[playerid]=727;
  2452. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Downtown - Ammu-Nation(jednokierunkowy)", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2453. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2454. _MruGracz(playerid, "+200$");
  2455. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Market - Rodeo\n{808080}Następny przystanek: Szpital");
  2456. }
  2457. else if(CP[playerid]==727)
  2458. {
  2459. DisablePlayerCheckpoint(playerid);
  2460. SetPlayerCheckpoint(playerid, 836.6970,-1318.8370,12.9458, 4);
  2461. CP[playerid]=728;
  2462. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Market – Szpital", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2463. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2464. _MruGracz(playerid, "+200$");
  2465. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Market - Rodeo\n{808080}Następny przystanek: Market Station ");
  2466. }
  2467. else if(CP[playerid]==728)
  2468. {
  2469. DisablePlayerCheckpoint(playerid);
  2470. SetPlayerCheckpoint(playerid, 341.5396,-1531.1141,32.8992, 4); //mrucznik tower
  2471. CP[playerid]=729;
  2472. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Market Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2473. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2474. _MruGracz(playerid, "+200$");
  2475. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Biurowiec 'Mrucznik Tower'\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: MRUCZNIK TOWER ");
  2476. }
  2477. else if(CP[playerid]==729)
  2478. {
  2479. DisablePlayerCheckpoint(playerid);
  2480. SetPlayerCheckpoint(playerid, 260.5440,-1531.3761,32.1662, 4); //nawrotka przy mrucznik tower
  2481. CP[playerid]=1003;
  2482. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Rodeo – Biurowiec 'Mrucznik Tower'", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2483. _MruGracz(playerid, "|_____________Komunikat_____________|");
  2484. _MruGracz(playerid, "Gratulacje! Ukończyłeś trasę do Mrucznik Tower! (1/2 zadania). Możesz tu odpocząć.");
  2485. _MruGracz(playerid, "Jeżeli chcesz jechać dalej wykonaj nawrót kierując się do kolejnego checkpointu!");
  2486. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2487. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2488. _MruGracz(playerid, "+200$");
  2489. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Market - Downtown - Urząd Miasta - Idlewood - Ganton - East Los Santos\n{808080}Odjazd nastąpi po sygnale!");
  2490. }
  2491. else if(CP[playerid]==1003)
  2492. {
  2493. TogglePlayerControllable(playerid, 1);
  2494. DisablePlayerCheckpoint(playerid);
  2495. SetPlayerCheckpoint(playerid, 830.8025,-1330.0034,13.5437, 4);
  2496. CP[playerid]=730;
  2497. ProxDetector(10.0, playerid, "Linia numer: {FFA500}72 (pomarańczowa) {FFFF00}Kierunek ==> {FFA500}BAZA MECHANIKÓW", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2498. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2499. _MruGracz(playerid, "+200$");
  2500. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Market - Downtown - Urząd Miasta - Idlewood - Ganton - East Los Santos\n{808080}Następny przystanek: Market Station ");
  2501. }
  2502. else if(CP[playerid]==730)
  2503. {
  2504. DisablePlayerCheckpoint(playerid);
  2505. SetPlayerCheckpoint(playerid, 1193.7321,-1358.3251,12.9416, 4);
  2506. CP[playerid]=731;
  2507. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Market Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2508. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2509. _MruGracz(playerid, "+200$");
  2510. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Market - Downtown - Urząd Miasta - Idlewood - Ganton - East Los Santos\n{808080}Następny przystanek: Szpital ");
  2511.  
  2512. }
  2513. else if(CP[playerid]==731)
  2514. {
  2515. DisablePlayerCheckpoint(playerid);
  2516. SetPlayerCheckpoint(playerid, 1527.9624,-1695.4071,12.9535, 4);//komi LS
  2517. CP[playerid]=734;
  2518. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Market - Szpital", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2519. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2520. _MruGracz(playerid, "+200$");
  2521. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Downtown - Urząd Miasta - Idlewood - Ganton - East Los Santos\n{808080}Następny przystanek: Urząd Miasta/Komisariat ");
  2522. }
  2523. else if(CP[playerid]==734)
  2524. {
  2525. DisablePlayerCheckpoint(playerid);
  2526. SetPlayerCheckpoint(playerid, 1924.6978,-1754.4702,12.9486, 4);
  2527. CP[playerid]=735;
  2528. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Pershing Square – Komisariat / Urząd Miasta", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2529. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2530. _MruGracz(playerid, "+200$");
  2531. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Idlewood - Ganton - East Los Santos\n{808080}Następny przystanek: Stacja Benzynowa ");
  2532. }
  2533. else if(CP[playerid]==735)
  2534. {
  2535. DisablePlayerCheckpoint(playerid);
  2536. SetPlayerCheckpoint(playerid, 2162.4690,-1754.0964,12.9439, 4);
  2537. CP[playerid]=736;
  2538. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Idlewood – Stacja Benzynowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2539. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2540. _MruGracz(playerid, "+200$");
  2541. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Idlewood - Ganton - East Los Santos\n{808080}Następny przystanek: Siłownia");
  2542. }
  2543. else if(CP[playerid]==736)
  2544. {
  2545. DisablePlayerCheckpoint(playerid);
  2546. SetPlayerCheckpoint(playerid, 2314.7969,-1661.7714,13.8587 , 4);
  2547. CP[playerid]=1010;
  2548. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Idlewood - Szamboa Gym", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2549. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2550. _MruGracz(playerid, "+200$");
  2551. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Ganton - East Los Santos\n{808080}Następny przystanek: Bar Ten Green Bottles (N/Ż) ");
  2552. }
  2553. else if(CP[playerid]==1010)
  2554. {
  2555. DisablePlayerCheckpoint(playerid);
  2556. SetPlayerCheckpoint(playerid, 2489.3118,-1735.8690,13.3172 , 4);
  2557. CP[playerid]=742;
  2558. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Ganton - Bar Ten Green Bottles (N/Ż)", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2559. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2560. _MruGracz(playerid, "+50$");
  2561. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Ganton - East Los Santos\n{808080}Następny przystanek: Groove Street ");
  2562. }
  2563. else if(CP[playerid]==742)
  2564. {
  2565. DisablePlayerCheckpoint(playerid);
  2566. SetPlayerCheckpoint(playerid, 2818.4243,-1576.9399,10.9287, 4);
  2567. CP[playerid]=737;
  2568. ProxDetector(10.0, playerid, "{FFFFFF}Linia 72: {FFFF00}Przystanek {EE82EE}Ganton - Groove Street", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2569. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2570. _MruGracz(playerid, "+100$");
  2571. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia nr 72\nKierunek: Baza Mechaników\n{778899}Trasa: Ganton - East Los Santos\n{808080}Następny przystanek: BAZA MECHANIKÓW (pętla) ");
  2572. }
  2573. else if(CP[playerid]==737)
  2574. {
  2575. if(BusCzit[playerid] == 1)
  2576. {
  2577. KickEx(playerid);
  2578. }
  2579. else
  2580. {
  2581. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}East Los Santos - Baza Mechaników (pętla)", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2582. DisablePlayerCheckpoint(playerid);
  2583. TogglePlayerControllable(playerid, 0);//Zamrażamy do póki nie odpowie co robi dalej
  2584. //ShowPlayerDialogEx(playerid, 8888, DIALOG_STYLE_MSGBOX, "Trasa", "Zrobiłeś pełną trasę. Co zamierzasz teraz zrobić?\n\nWciśnij Ponów aby wczytać trasę jeszcze raz.\nWciśnij Inną aby wybrać inną trasę.", "Ponów", "Inną");
  2585. _MruGracz(playerid, "|_____________Trasa linii 72 zakończona!_____________|");
  2586. _MruGracz(playerid, "Otrzymujesz 3300$ premii za dwukrotne przejechanie trasy! (19 przystanków)");
  2587. _MruGracz(playerid, "Możesz znów rozpocząć tą lub inną trasę lub zrezygnować poprzez zamknięcie menu wyboru.");
  2588. _MruGracz(playerid, "Chcąc powtórzyć tą trasę zawróć wykorzystując parking znajdujący się na skrzyżowaniu w w lewo.");
  2589. _MruGracz(playerid, "Jeżeli jednak chcesz zakończyć pracę kieruj się do zajezdni LSBD (wskazanej przez GPS).");
  2590. _MruGracz(playerid, "|_____________>>Los Santos Bus Department<<_____________|");
  2591. _MruGracz(playerid, "Skill +1");
  2592. PlayerInfo[playerid][pCarSkill] ++;
  2593. if(GetPlayerFraction(playerid) == FRAC_KT) Sejf_Add(FRAC_KT, 3300);
  2594. else DajKase(playerid, 3300);
  2595. CP[playerid] = 0;
  2596. PlayerInfo[playerid][pLinia72] = 0;
  2597. PlayerInfo[playerid][pNatrasiejest] = 0;
  2598. ShowPlayerDialogEx(playerid, 8155, DIALOG_STYLE_LIST, "Wybierz swój kurs:", "Linia 55 -niebieska (230$/p , 9min, 21p, +2)\nLinia 72- pomarańczowa (200$/p, 6min, 15p, +1)\nLinia 96 - zielona 4s (310$/p, 8min, 24p, +1)\nLinia 82 żółta 5s (510$/p , 11min, 18p, +3)\nLinia 85 3s (270$/p , ? min, 24p, +2)\nWycieczka 5s\nPowrót do bazy\nPomoc", "Wybierz", "Wyjdz");
  2599. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLider] == 10)
  2600. {
  2601. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia ZAJ\nLinia 72 do zajezdni Ocean Docks\n{778899}Trasa: Idlewood - Willowfield\n{808080}Zatrzymuje się na przystankach");
  2602. SetPlayerCheckpoint(playerid, 2431.2551,-2094.0959,13.5469, 4);
  2603. CP[playerid]=1200;
  2604. }
  2605. else if(PlayerInfo[playerid][pJob] == 10)
  2606. {
  2607. Przystanek(playerid, 0xAFAFAFFF, "{FFA500}Linia ZAJ\nLinia 72 do zajezdni Commerce\n{778899}Trasa: Idlewood - Pershing Square - Commerce\n{808080}Zatrzymuje się na przystankach");
  2608. SetPlayerCheckpoint(playerid, 1138.5,-1738.3,13.5, 4);
  2609. CP[playerid]=1201;
  2610. }
  2611. }
  2612. }
  2613. }
  2614. // KONIEC LINII 72 AUTOBUSÓW
  2615. //Linia numer 82 autobusa SYSTEM AUTOBUSÓW
  2616. if(PlayerInfo[playerid][pLinia82]==1)
  2617. {
  2618. if(CP[playerid]==821) //Sprawdza czy dojechał do nastepnego
  2619. {
  2620. _MruGracz(playerid, "|_____________Przypomnienie_____________|");
  2621. _MruGracz(playerid, "Nie zapomnij rozpocząć służby!!!");
  2622. _MruGracz(playerid, "Wpisz {FFFF00}/fare [cena]");
  2623. _MruGracz(playerid, "Jezeli chcesz ruszyć po wjechaniu w przystanek wpisz /zd");
  2624. _MruGracz(playerid, "Jeżeli będziesz chciał przerwać trasę wcześniej wpisz /zakoncztrase");
  2625. _MruGracz(playerid, "|_____________>>/fare<<_____________|");
  2626. ProxDetector(10.0, playerid, "Linia numer: {DAA520}82 (żółta) {FFFF00}Kierunek ==> {DAA520}BAY SIDE", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2627. SetPlayerCheckpoint(playerid, 1532.3134,-1648.4254,12.9485, 4); //... ustawia nastepnego KOMi (jedn)
  2628. CP[playerid]=822; //przypisuje id dla cp up
  2629. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);//
  2630. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: Urząd Miasta - East Los Santos - Palomino Creek - Dillimore - Bluberry - Las Venturas\n{808080}Następny przystanek: Komisariat / Urząd Miasta ");
  2631. }
  2632. else if(CP[playerid]==822)
  2633. {
  2634. DisablePlayerCheckpoint(playerid);
  2635. SetPlayerCheckpoint(playerid, 2864.6250,-1539.0991,10.4947, 4);
  2636. CP[playerid]=823;
  2637. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Pershing Square – Komisariat / Urząd Miasta", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2638. _MruGracz(playerid, "|_____________Droga do Mechaników_____________|");
  2639. _MruGracz(playerid, "Kieruj się do Alhambry, potem w LEWO.");
  2640. _MruGracz(playerid, "Wjedź na autostradę, następnie prosto do bazy mechaników.");
  2641. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2642. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2643. _MruGracz(playerid, "+510$");
  2644. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: East Los Santos - Palomino Creek - Dillimore - Bluberry - Las Venturas\n{808080}Następny przystanek: Baza Mechaników ");
  2645.  
  2646. }
  2647. else if(CP[playerid]==823)
  2648. {
  2649. DisablePlayerCheckpoint(playerid);
  2650. SetPlayerCheckpoint(playerid, 2839.9409,-1098.3546,23.5453, 4);
  2651. CP[playerid]=824;
  2652. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}East Los Santos – Baza Mechaników", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2653. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2654. _MruGracz(playerid, "+510$");
  2655. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: East Los Santos - Palomino Creek - Dillimore - Bluberry - Las Venturas\n{808080}Następny przystanek: Agencja Ochrony ");
  2656. }
  2657. else if(CP[playerid]==824)
  2658. {
  2659. DisablePlayerCheckpoint(playerid);
  2660. SetPlayerCheckpoint(playerid, 2339.9377,39.4851,26.3359, 4);
  2661. CP[playerid]=825;
  2662. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}East Los Santos – Agencja Ochrony", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2663. _MruGracz(playerid, "|_____________Droga do PC_____________|");
  2664. _MruGracz(playerid, "Jedź ciągle prosto zwykłą drogą. Nie zjeżdżaj na autostradę.");
  2665. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2666. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2667. _MruGracz(playerid, "+510$");
  2668. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: Palomino Creek - Dillimore - Bluberry - Las Venturas\n{808080}Następny przystanek: miasteczko Palomino Creek ");
  2669. }
  2670. else if(CP[playerid]==825)
  2671. {
  2672. DisablePlayerCheckpoint(playerid);
  2673. SetPlayerCheckpoint(playerid, 1051.7797,-444.1544,51.0848, 4); //Przystanek PC
  2674. CP[playerid]=826;
  2675. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Palomino Creek", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2676. _MruGracz(playerid, "|_____________Droga do Dillimore_____________|");
  2677. _MruGracz(playerid, "Gdy przejedziesz po moście za 400m SKRĘĆ W LEWO na most.");
  2678. _MruGracz(playerid, "Późneij kieruj się do tunelu. Cały czas prosto");
  2679. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2680. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2681. _MruGracz(playerid, "+510$");
  2682. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: Dillimore - Bluberry - Las Venturas\n{808080}Następny przystanek: Hilltop Farm ");
  2683. }
  2684. else if(CP[playerid]==826)
  2685. {
  2686. DisablePlayerCheckpoint(playerid);
  2687. SetPlayerCheckpoint(playerid, 661.4372,-597.9591,15.7536, 4);
  2688. CP[playerid]=827;
  2689. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Dillimore – Hilltop Farm", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2690. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2691. _MruGracz(playerid, "+510$");
  2692. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: Dillimore - Bluberry - Las Venturas\n{808080}Następny przystanek: miasteczko Dillimore ");
  2693. }
  2694. else if(CP[playerid]==827)
  2695. {
  2696. DisablePlayerCheckpoint(playerid);
  2697. SetPlayerCheckpoint(playerid, 235.2872,-54.7197,1.5620, 4);
  2698. CP[playerid]=828;
  2699. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Dillimore", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2700. _MruGracz(playerid, "|_____________Droga do Bluberry_____________|");
  2701. _MruGracz(playerid, "Gdy miniesz komisariat SKRĘĆ W LEWO.");
  2702. _MruGracz(playerid, "Jedź prosto drogą do i SKRĘĆ W LEWO do wyjazdu przy Cowboy Bar. Potem prosto.");
  2703. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2704. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2705. _MruGracz(playerid, "+510$");
  2706. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: Bluberry - Las Venturas\n{808080}Następny przystanek: miasteczko Bluberry ");
  2707. }
  2708. else if(CP[playerid]==828)
  2709. {
  2710. DisablePlayerCheckpoint(playerid);
  2711. SetPlayerCheckpoint(playerid, -2494.9761,2333.7603,4.9693, 4);//bay side końcowy
  2712. CP[playerid]=829;
  2713. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Bluberry", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2714. _MruGracz(playerid, "|_____________Droga do Bay Side_____________|");
  2715. _MruGracz(playerid, "Po wyjeździe z Bluberry SKRĘĆ W LEWO");
  2716. _MruGracz(playerid, "Po przejechaniu 800m SKRĘĆ W PRAWO na most");
  2717. _MruGracz(playerid, "Następnie za 300m SKRĘĆ W LEWO na autostrade. Dalej cały czas prosto.");
  2718. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2719. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2720. _MruGracz(playerid, "+510$");
  2721. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: Las Venturas\n{808080}Następny przystanek: miasteczko Bay Side ");
  2722. }
  2723. else if(CP[playerid]==829)
  2724. {
  2725. DisablePlayerCheckpoint(playerid);
  2726. SetPlayerCheckpoint(playerid, -2538.2993,2333.5835,4.8281, 4);
  2727. CP[playerid]=1000;
  2728. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Bay Side", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2729. _MruGracz(playerid, "|_____________Komunikat_____________|");
  2730. _MruGracz(playerid, "Gratulacje! Ukończyłeś trasę do Bay Side! (1/2 zadania)");
  2731. _MruGracz(playerid, "Możesz chwilkę odpocząć, wjedź w kolejny checkpoint aby ruszyć dalej!");
  2732. _MruGracz(playerid, "Dodatkowo otrzymujesz premię paliwową z uwagi na utrudniony dostęp do mechaników.");
  2733. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2734. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2735. _MruGracz(playerid, "+510$");
  2736. Gas[GetPlayerVehicleID(playerid)] = 100;
  2737. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Dworzec Commerce\n{778899}Trasa: Bluberry - Dillimore - Palomino Creek - East Los Santos - Commerce\n{808080}Odjazd nastąpi po sygnale ");
  2738. }
  2739. else if(CP[playerid]==1000)
  2740. {
  2741. DisablePlayerCheckpoint(playerid);
  2742. SetPlayerCheckpoint(playerid, 229.9310,-170.9327,1.0001, 4);
  2743. CP[playerid]=830;
  2744. ProxDetector(10.0, playerid, "Linia numer: {DAA520}82 (żółta) {FFFF00}Kierunek ==> {DAA520}DWORZEC AUTOBUSOWY COMMERCE", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2745. TogglePlayerControllable(playerid, 1);
  2746. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2747. _MruGracz(playerid, "+510$");
  2748. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Dworzec Autobusowy\n{778899}Trasa: Bluberry - Dillimore - Palomino Creek - East Los Santos - Commerce\n{808080}Następny przystanek: miasteczko Bluberry");
  2749. }
  2750. else if(CP[playerid]==830)
  2751. {
  2752. DisablePlayerCheckpoint(playerid);
  2753. SetPlayerCheckpoint(playerid, 684.2634,-569.5635,16.3208, 4);
  2754. CP[playerid]=831;
  2755. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Bluberry", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2756. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2757. _MruGracz(playerid, "+510$");
  2758. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek:Dworzec Autobusowy\n{778899}Trasa: Dillimore - Palomino Creek - East Los Santos - Commerce\n{808080}Następny przystanek: miasteczko Dillimore");
  2759. }
  2760. else if(CP[playerid]==831)
  2761. {
  2762. DisablePlayerCheckpoint(playerid);
  2763. SetPlayerCheckpoint(playerid, 1014.1871,-466.1351,50.5591, 4);
  2764. CP[playerid]=832;
  2765. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Dillimore", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2766. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2767. _MruGracz(playerid, "+510$");
  2768. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Dworzec Autobusowy\n{778899}Trasa: Dillimore - Palomino Creek - East Los Santos - Commerce\n{808080}Następny przystanek: Hilltop Farm");
  2769. }
  2770. else if(CP[playerid]==832)
  2771. {
  2772. DisablePlayerCheckpoint(playerid);
  2773. SetPlayerCheckpoint(playerid, 2577.4602,39.4546,26.3359, 4); //PC prawa
  2774. CP[playerid]=833;
  2775. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Dillimore – Hilltop Farm", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2776. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2777. _MruGracz(playerid, "+510$");
  2778. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Dworzec Autobusowy\n{778899}Trasa: Palomino Creek - East Los Santos - Commerce\n{808080}Następny przystanek: miasteczko Palomino Creek");
  2779. }
  2780. else if(CP[playerid]==833)
  2781. {
  2782. DisablePlayerCheckpoint(playerid);
  2783. SetPlayerCheckpoint(playerid, 2835.9119,-1100.0378,23.6009, 4); //nakijima prawa
  2784. CP[playerid]=834;
  2785. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}Palomino Creek", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2786. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2787. _MruGracz(playerid, "+510$");
  2788. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Dworzec Autobusowy\n{778899}Trasa: East Los Santos - Commerce\n{808080}Następny przystanek: Agencja Ochrony");
  2789. }
  2790. else if(CP[playerid]==834)
  2791. {
  2792. DisablePlayerCheckpoint(playerid);
  2793. SetPlayerCheckpoint(playerid, 2852.0789,-1563.2421,10.4871, 4);
  2794. CP[playerid]=835;
  2795. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}East Los Santos – Agencja Ochrony", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2796. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2797. _MruGracz(playerid, "+510$");
  2798. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: East Los Santos - Commerce\n{808080}Następny przystanek: Baza Mechaników");
  2799. }
  2800. else if(CP[playerid]==835)
  2801. {
  2802. DisablePlayerCheckpoint(playerid);
  2803. SetPlayerCheckpoint(playerid, 1181.8771,-1748.0386,12.9679, 4);
  2804. CP[playerid]=836;
  2805. ProxDetector(10.0, playerid, "{FFFFFF}Linia 82: {FFFF00}Przystanek {EE82EE}East Los Santos – Baza Mechaników", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2806. _MruGracz(playerid, "|_____________Droga do Dworca_____________|");
  2807. _MruGracz(playerid, "Jedź ciągle autostradą.");
  2808. _MruGracz(playerid, "Wyjedź na Idlewoo i kieruj się cały czas prosto.");
  2809. _MruGracz(playerid, "Po przejechaniu spowalniacza, SKRĘĆ w LEWO i kieruj się na dworzec.");
  2810. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2811. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2812. _MruGracz(playerid, "+510$");
  2813. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia nr 82\nKierunek: Bay Side\n{778899}Trasa: Commerce\n{808080}Następny przystanek: Dworzec Autobusowy / Basen");
  2814. }
  2815. else if(CP[playerid]==836)
  2816. {
  2817. if(BusCzit[playerid] == 1)
  2818. {
  2819. KickEx(playerid);
  2820. }
  2821. else
  2822. {
  2823. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Commerce – Dworzec Autobusowy / Basen", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2824. DisablePlayerCheckpoint(playerid);
  2825. TogglePlayerControllable(playerid, 0);//Zamrażamy do póki nie odpowie co robi dalej
  2826. //ShowPlayerDialogEx(playerid, 8888, DIALOG_STYLE_MSGBOX, "Trasa", "Zrobiłeś pełną trasę. Co zamierzasz teraz zrobić?\n\nWciśnij Ponów aby wczytać trasę jeszcze raz.\nWciśnij Inną aby wybrać inną trasę.", "Ponów", "Inną");
  2827. _MruGracz(playerid, "|_____________Trasa linii 82 zakończona!_____________|");
  2828. _MruGracz(playerid, "Otrzymujesz 8670$ premii za dwukrotne przejechanie trasy! (17 przystanków)");
  2829. _MruGracz(playerid, "Możesz znów rozpocząć tą lub inną trasę lub zrezygnować poprzez zamknięcie menu wyboru.");
  2830. _MruGracz(playerid, "Jeżeli jednak chcesz zakończyć pracę kieruj się do zajezdni LSBD (wskazanej przez GPS).");
  2831. _MruGracz(playerid, "|_____________>>Los Santos Bus Department<<_____________|");
  2832. _MruGracz(playerid, "Skill +3");
  2833. PlayerInfo[playerid][pCarSkill] += 3;
  2834. if(GetPlayerFraction(playerid) == FRAC_KT) Sejf_Add(FRAC_KT, 8670);
  2835. else DajKase(playerid, 8670);
  2836. CP[playerid] = 0;
  2837. PlayerInfo[playerid][pLinia82] = 0;
  2838. PlayerInfo[playerid][pNatrasiejest] = 0;
  2839. ShowPlayerDialogEx(playerid, 8155, DIALOG_STYLE_LIST, "Wybierz swój kurs:", "Linia 55 -niebieska (230$/p , 9min, 21p, +2)\nLinia 72- pomarańczowa (200$/p, 6min, 15p, +1)\nLinia 96 - zielona 4s (310$/p, 8min, 24p, +1)\nLinia 82 żółta 5s (510$/p , 11min, 18p, +3)\nLinia 85 3s (270$/p , ? min, 24p, +2)\nWycieczka 5s\nPowrót do bazy\nPomoc", "Wybierz", "Wyjdz");
  2840. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLider] == 10)
  2841. {
  2842. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia ZAJ\nLinia 82 do zajezdni Ocean Docks\n{778899}Trasa: Pershing Square - Idlewood - Willowfield\n{808080}Zatrzymuje się na przystankach");
  2843. SetPlayerCheckpoint(playerid, 2431.2551,-2094.0959,13.5469, 4);
  2844. CP[playerid]=1200;
  2845. }
  2846. else if(PlayerInfo[playerid][pJob] == 10)
  2847. {
  2848. Przystanek(playerid, 0xAFAFAFFF, "{DAA520}Linia ZAJ\nLinia 82 do zajezdni Commerce\n{778899}Trasa: Commerce\n{808080}Zatrzymuje się na przystankach");
  2849. SetPlayerCheckpoint(playerid, 1138.5,-1738.3,13.5, 4);
  2850. CP[playerid]=1201;
  2851. }
  2852. }
  2853. }
  2854. }
  2855. // KONIEC LINII 82 AUTOBUSÓW system autobusów
  2856. if(PlayerInfo[playerid][pLinia96]==1)
  2857. {
  2858. if(CP[playerid]==961) //Sprawdza czy dojechał do nastepnego
  2859. {
  2860. DisablePlayerCheckpoint(playerid);
  2861. /*GetPlayerName(playerid,sendername,sizeof(sendername));
  2862. format(string, sizeof(string), "%s rozpoczął trasę na linii autobusowej numer {ADFF2F}96 Biurowiec <==> Baza Wojskowa{00D900C8}. Szczegółowe informacje o trasach na /businfo", sendername);
  2863. OOCNews(TEAM_GROVE_COLOR,string);*/
  2864. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Ocean Docks - Lotnisko - El Corona - Commerce - Market - Marina - Rodeo\n{808080}Następny przystanek: Baza Wojskowa");
  2865. ProxDetector(10.0, playerid, "Linia numer: {ADFF2F}96 (zielona) {FFFF00}Kierunek ==> {ADFF2F}MRUCZNIK TOWER", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2866. SetPlayerCheckpoint(playerid, 2512.0193,-2434.2727,13.7151, 4); //... ustawia nastepnego
  2867. CP[playerid]=985; //przypisuje id dla cp up
  2868. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);//
  2869. }
  2870. else if(CP[playerid]==985)
  2871. {
  2872. DisablePlayerCheckpoint(playerid);
  2873. SetPlayerCheckpoint(playerid, 2228.8030,-2198.2109,12.9153, 4);//uszkodzony
  2874. CP[playerid]=962;
  2875. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Lotnisko - El Corona - Commerce - Market - Marina - Rodeo\n{808080}Następny przystanek: Fabryka");
  2876. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Ocean Docks – Baza Wosjkowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2877. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2878. _MruGracz(playerid, "+310$");
  2879. }
  2880. else if(CP[playerid]==962)
  2881. {
  2882. DisablePlayerCheckpoint(playerid);
  2883. SetPlayerCheckpoint(playerid, 1992.8591,-2163.2961,13.3828, 4);//uszkodzony
  2884. CP[playerid]=963;
  2885. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Lotnisko - El Corona - Commerce - Market - Marina - Rodeo\n{808080}Następny przystanek: Pas Startowy");
  2886. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Ocean Docks – Fabryka", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2887. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2888. _MruGracz(playerid, "+310$");
  2889. }
  2890. else if(CP[playerid]==963)
  2891. {
  2892. DisablePlayerCheckpoint(playerid);
  2893. SetPlayerCheckpoint(playerid, 1895.3,-1935.31,13.399, 4);
  2894. CP[playerid]=964;
  2895. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: El Corona - Commerce - Market - Marina - Rodeo\n{808080}Następny przystanek: Wiadukt");
  2896. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Lotnisko – Pas Startowy", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2897. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2898. _MruGracz(playerid, "+310$");
  2899. }
  2900. else if(CP[playerid]==964)
  2901. {
  2902. DisablePlayerCheckpoint(playerid);
  2903. SetPlayerCheckpoint(playerid, 1742.6479,-1816.3966,12.9351, 4);
  2904. CP[playerid]=965;
  2905. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: El Corona - Commerce - Market - Marina - Rodeo\n{808080}Następny przystanek: Unity Station");
  2906. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}El Corona – Wiadukt", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2907. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2908. _MruGracz(playerid, "+310$");
  2909. }
  2910. else if(CP[playerid]==965)
  2911. {
  2912. DisablePlayerCheckpoint(playerid);
  2913. SetPlayerCheckpoint(playerid, 1463.1995,-1868.8994,13.3999, 4); //Przystanek commerce VB prawa
  2914. CP[playerid]=966;
  2915. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Commerce - Market - Marina - Rodeo\n{808080}Następny przystanek: Verdant Bluffs / Urząd Miasta");
  2916. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}El Corona – Unity Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2917. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2918. _MruGracz(playerid, "+310$");
  2919. }
  2920. else if(CP[playerid]==966)
  2921. {
  2922. DisablePlayerCheckpoint(playerid);
  2923. SetPlayerCheckpoint(playerid, 1181.8771,-1748.0386,12.9679, 4);
  2924. CP[playerid]=967;
  2925. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Commerce - Market - Marina - Rodeo\n{808080}Następny przystanek: Zajezdnia Autobusowa");
  2926. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Commerce – Verdant Bluffs / Urząd Miasta", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2927. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2928. _MruGracz(playerid, "+310$");
  2929. }
  2930. else if(CP[playerid]==967)
  2931. {
  2932. DisablePlayerCheckpoint(playerid);
  2933. SetPlayerCheckpoint(playerid, 1084.2205,-1569.8024,12.9443, 4);
  2934. CP[playerid]=968;
  2935. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Market - Marina - Rodeo\n{808080}Następny przystanek: Galerie Handlowe");
  2936. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Commerce – Basen „Tsunami” / Zajezdnia Autobusowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2937. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2938. _MruGracz(playerid, "+310$");
  2939. }
  2940. else if(CP[playerid]==968)
  2941. {
  2942. DisablePlayerCheckpoint(playerid);
  2943. SetPlayerCheckpoint(playerid, 824.0928,-1624.2281,12.9477, 4);
  2944. CP[playerid]=969;
  2945. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Marina - Rodeo\n{808080}Następny przystanek: Burger Shot");
  2946. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Market – Galerie handlowe", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2947. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2948. _MruGracz(playerid, "+310$");
  2949. }
  2950. else if(CP[playerid]==969)
  2951. {
  2952. DisablePlayerCheckpoint(playerid);
  2953. SetPlayerCheckpoint(playerid, 639.6337,-1452.6040,13.7631, 4);
  2954. CP[playerid]=970;
  2955. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: Główna Siedziba FBI");
  2956. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Marina – Burger Shot", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2957. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2958. _MruGracz(playerid, "+310$");
  2959. }
  2960. else if(CP[playerid]==970)
  2961. {
  2962. DisablePlayerCheckpoint(playerid);
  2963. SetPlayerCheckpoint(playerid, 535.0409,-1243.6492,16.0884, 4);// wypozyczalnia prawa
  2964. CP[playerid]=971;
  2965. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: Wypożyczalnia Aut");
  2966. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Rodeo – Główna siedziba FBI", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2967. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2968. _MruGracz(playerid, "+310$");
  2969. }
  2970. else if(CP[playerid]==971)
  2971. {
  2972. DisablePlayerCheckpoint(playerid);
  2973. SetPlayerCheckpoint(playerid, 341.5396,-1531.1141,32.8992, 4);
  2974. CP[playerid]=972;
  2975. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Mrucznik Tower\n{778899}Trasa: Rodeo\n{808080}Następny przystanek: MRUCZNIK TOWER");
  2976. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Rodeo – Wypożyczalnia Pojazdów", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2977. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2978. _MruGracz(playerid, "+310$");
  2979. }
  2980. else if(CP[playerid]==972)
  2981. {
  2982. DisablePlayerCheckpoint(playerid);
  2983. SetPlayerCheckpoint(playerid, 276.5778,-1575.9937,32.8686, 4); //Końcowy CP
  2984. CP[playerid]=1004;
  2985. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Rodeo - Marina - Market - Commerce - El Corona - Lotnisko - Ocean Docks\n{808080}Odjazd nastąpi po sygnale");
  2986. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Rodeo - Mrucznik Tower", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  2987. _MruGracz(playerid, "|_____________Komunikat_____________|");
  2988. _MruGracz(playerid, "Gratulacje! Ukończyłeś trasę do Mrucznik Tower! (1/2 zadania). Możesz odpocząć.");
  2989. _MruGracz(playerid, "Jeżeli chcesz jechać dalej wykonaj nawrót kierując się do kolejnego checkpointu!");
  2990. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  2991. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  2992. _MruGracz(playerid, "+310$");
  2993. }
  2994. else if(CP[playerid]==1004)
  2995. {
  2996. DisablePlayerCheckpoint(playerid);
  2997. SetPlayerCheckpoint(playerid, 577.4726,-1236.8068,17.0600, 4); //Druga strona ulicy CP
  2998. CP[playerid]=973;
  2999. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Rodeo - Marina - Market - Commerce - El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Wypożyczalnia Aut");
  3000. ProxDetector(10.0, playerid, "Linia numer: {ADFF2F}96 (zielona) {FFFF00}Kierunek ==> {ADFF2F}WIĘZIENIE STANOWE", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3001. TogglePlayerControllable(playerid, 1);
  3002. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3003. _MruGracz(playerid, "+310$");
  3004. }
  3005. else if(CP[playerid]==973)
  3006. {
  3007. DisablePlayerCheckpoint(playerid);
  3008. SetPlayerCheckpoint(playerid, 625.2355,-1470.5664,13.9573, 4); //Druga strona ulicy CP
  3009. CP[playerid]=974;
  3010. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Rodeo - Marina - Market - Commerce - El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Główna Siedziba FBI");
  3011. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Rodeo – Wypożyczalnia Pojazdów", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3012. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3013. _MruGracz(playerid, "+310$");
  3014. }
  3015. else if(CP[playerid]==974)
  3016. {
  3017. DisablePlayerCheckpoint(playerid);
  3018. SetPlayerCheckpoint(playerid, 840.9546,-1614.0339,12.9483, 4);
  3019. CP[playerid]=975;
  3020. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Marina - Market - Commerce - El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Burger Shot");
  3021. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Rodeo – Główna siedziba FBI", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3022. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3023. _MruGracz(playerid, "+310$");
  3024. }
  3025. else if(CP[playerid]==975)
  3026. {
  3027. DisablePlayerCheckpoint(playerid);
  3028. SetPlayerCheckpoint(playerid, 1105.6156,-1574.0813,12.9401, 4);
  3029. CP[playerid]=976;
  3030. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Market - Commerce - El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Galerie Handlowe");
  3031. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Marina – Burger Shot", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3032. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3033. _MruGracz(playerid, "+310$");
  3034. }
  3035. else if(CP[playerid]==976)
  3036. {
  3037. DisablePlayerCheckpoint(playerid);
  3038. SetPlayerCheckpoint(playerid, 1173.1520,-1825.2843,13.1789, 4);
  3039. CP[playerid]=977;
  3040. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Commerce - El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Zajezdnia Autobusowa");
  3041. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Market – Galerie handlowe", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3042. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3043. _MruGracz(playerid, "+310$");
  3044. }
  3045. else if(CP[playerid]==977)
  3046. {
  3047. DisablePlayerCheckpoint(playerid);
  3048. SetPlayerCheckpoint(playerid, 1492,-1875.8005,13.9999, 4);
  3049. CP[playerid]=978;
  3050. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Commerce - El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Verdant Bluffs / Urząd Miasta");
  3051. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Commerce – Basen „Tsunami” / Zajezdnia Autobusowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3052. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3053. _MruGracz(playerid, "+310$");
  3054. }
  3055. else if(CP[playerid]==978)
  3056. {
  3057. DisablePlayerCheckpoint(playerid);
  3058. SetPlayerCheckpoint(playerid, 1791.1583,-1833.9706,12.9519, 4); //wiadukt lewy
  3059. CP[playerid]=979;
  3060. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Unity Station");
  3061. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Commerce – Verdant Bluffs", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3062. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3063. _MruGracz(playerid, "+310$");
  3064. }
  3065. else if(CP[playerid]==979)
  3066. {
  3067. DisablePlayerCheckpoint(playerid);
  3068. SetPlayerCheckpoint(playerid, 1895.3,-1935.31,13.399, 4);
  3069. CP[playerid]=980;
  3070. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: El Corona - Lotnisko - Ocean Docks\n{808080}Następny przystanek: Wiadukt");
  3071. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}El Corona – Unity Station", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3072. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3073. _MruGracz(playerid, "+310$");
  3074. }
  3075. else if(CP[playerid]==980)
  3076. {
  3077. DisablePlayerCheckpoint(playerid);
  3078. SetPlayerCheckpoint(playerid, 1977.1256,-2168.7412,12.9419, 4);
  3079. CP[playerid]=981;
  3080. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Lotnisko - Ocean Docks\n{808080}Następny przystanek: Pas Startowy");
  3081. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}El Corona – Wiadukt", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3082. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3083. _MruGracz(playerid, "+310$");
  3084. }
  3085. else if(CP[playerid]==981)
  3086. {
  3087. DisablePlayerCheckpoint(playerid);
  3088. SetPlayerCheckpoint(playerid, 2228.8030,-2198.2109,12.9153, 4);
  3089. CP[playerid]=982;
  3090. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Ocean Docks\n{808080}Następny przystanek: Fabryka");
  3091. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Lotnisko – Pas Startowy", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3092. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3093. _MruGracz(playerid, "+310$");
  3094. }
  3095. else if(CP[playerid]==982)
  3096. {
  3097. DisablePlayerCheckpoint(playerid);
  3098. SetPlayerCheckpoint(playerid, 2335.9858,-2355.0427,13.3828, 4);
  3099. CP[playerid]=1202;
  3100. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Ocean Docks\n{808080}Następny przystanek: Baza Wosjkowa");
  3101. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Ocen Docks – Fabryka", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3102. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3103. _MruGracz(playerid, "+310$");
  3104. }
  3105. else if(CP[playerid]==982)
  3106. {
  3107. DisablePlayerCheckpoint(playerid);
  3108. SetPlayerCheckpoint(playerid, 2495.6113,-2408.0415,13.5445, 4);
  3109. CP[playerid]=983;
  3110. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Ocean Docks\n{808080}Następny przystanek: Baza Wosjkowa");
  3111. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Ocen Docks – Baza Wosjkowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3112. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3113. _MruGracz(playerid, "+310$");
  3114. }
  3115. else if(CP[playerid]==983)
  3116. {
  3117. DisablePlayerCheckpoint(playerid);
  3118. SetPlayerCheckpoint(playerid, 2687.6597,-2406.9775,13.6017, 4);
  3119. CP[playerid]=984;
  3120. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia nr. 96\nKierunek: Więzienie Stanowe\n{778899}Trasa: Ocean Docks\n{808080}Następny przystanek: WIĘZIENIE STANOWE");
  3121. ProxDetector(10.0, playerid, "{FFFFFF}Linia 96: {FFFF00}Przystanek {EE82EE}Ocen Docks – Baza Wosjkowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3122. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3123. _MruGracz(playerid, "+310$");
  3124. }
  3125. else if(CP[playerid]==984)
  3126. {
  3127. if(BusCzit[playerid] == 1)
  3128. {
  3129. KickEx(playerid);
  3130. }
  3131. else
  3132. {
  3133. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Ocean Docks – Więzienie Stanowe", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3134. _MruGracz(playerid, "|_____________Trasa linii 96 zakończona!_____________|");
  3135. _MruGracz(playerid, "Otrzymujesz 7440$ premii za dwukrotne przejechanie trasy! (24 przystanki)");
  3136. _MruGracz(playerid, "Możesz znów rozpocząć tą lub inną trasę lub zrezygnować poprzez zamknięcie menu wyboru.");
  3137. _MruGracz(playerid, "Jeżeli jednak chcesz zakończyć pracę kieruj się do zajezdni LSBD (wskazanej przez syganł GPS).");
  3138. _MruGracz(playerid, "|_____________>>Los Santos Bus Department<<_____________|");
  3139. _MruGracz(playerid, "Skill +1");
  3140. PlayerInfo[playerid][pCarSkill] ++;
  3141. if(GetPlayerFraction(playerid) == FRAC_KT) Sejf_Add(FRAC_KT, 7440);
  3142. else DajKase(playerid, 7440);
  3143. CP[playerid] = 0;
  3144. PlayerInfo[playerid][pLinia96] = 0;
  3145. PlayerInfo[playerid][pNatrasiejest] = 0;
  3146. ShowPlayerDialogEx(playerid, 8155, DIALOG_STYLE_LIST, "Wybierz swój kurs:", "Linia 55 - niebieska (230$/p , 9min, 21p, +2)\nLinia 72 - pomarańczowa (200$/p, 6min, 15p, +1)\nLinia 96 - zielona 4s (310$/p, 8min, 24p, +1)\nLinia 82 żółta 5s (510$/p , 11min, 18p, +3)\nLinia 85 3s (270$/p , ? min, 24p, +2)\nWycieczka 5s\nPowrót do bazy\nPomoc", "Wybierz", "Wyjdz");
  3147. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLider] == 10)
  3148. {
  3149. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia ZAJ\nLinia 96 do zajezdni Ocean Docks\n{778899}Trasa: Ocean Docks\n{808080}Zatrzymuje się na przystankach");
  3150. SetPlayerCheckpoint(playerid, 2431.2551,-2094.0959,13.5469, 4);
  3151. CP[playerid]=1200;
  3152. }
  3153. else if(PlayerInfo[playerid][pJob] == 10)
  3154. {
  3155. Przystanek(playerid, 0xAFAFAFFF, "{ADFF2F}Linia ZAJ\nLinia 96 do zajezdni Commerce\n{778899}Trasa: Ocean Docks - Lotnisko - El Corona - Pershing Square - Commerce\n{808080}Zatrzymuje się na przystankach");
  3156. SetPlayerCheckpoint(playerid, 1138.5,-1738.3,13.5, 4);
  3157. CP[playerid]=1201;
  3158. }
  3159. }
  3160. }
  3161. }
  3162. if(PlayerInfo[playerid][pLinia85]==1)//linia 85 system autobusów
  3163. {
  3164. if(CP[playerid]==501) //Sprawdza czy dojechał do nastepnego
  3165. {
  3166. DisablePlayerCheckpoint(playerid);
  3167. /*GetPlayerName(playerid,sendername,sizeof(sendername));
  3168. format(string, sizeof(string), "%s rozpoczął trasę na linii autobusowej numer {FF00FF}85 Wysypisko <==> Szpital{00D900C8}. Szczegółowe informacje o trasach na /businfo", sendername);
  3169. OOCNews(TEAM_GROVE_COLOR,string);*/
  3170. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Willowfield - East Los Santos - Las Colinas - Jefferson - Glen Park - Downtown - Market\n{808080}Następny przystanek: Cluckin Bell");
  3171. ProxDetector(10.0, playerid, "Linia numer: {FF00FF}85 (różowa) {FFFF00}Kierunek ==> {FF00FF}SZPITAL", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3172. SetPlayerCheckpoint(playerid, 2415.8232,-1912.1696,12.9518, 4); //... ustawia nastepnego
  3173. CP[playerid]=502; //przypisuje id dla cp up
  3174. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);//
  3175. }
  3176. else if(CP[playerid]==502)
  3177. {
  3178. DisablePlayerCheckpoint(playerid);
  3179. SetPlayerCheckpoint(playerid, 2488.0164,-1506.9924,23.3944, 4);//uszkodzony
  3180. CP[playerid]=503;
  3181. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: East Los Santos - Las Colinas - Jefferson - Glen Park - Downtown - Market\n{808080}Następny przystanek: Myjnia Samochodowa");
  3182. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Willowfield – Cluck'in Bell", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3183. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3184. _MruGracz(playerid, "+270$");
  3185. }
  3186. else if(CP[playerid]==503)
  3187. {
  3188. DisablePlayerCheckpoint(playerid);
  3189. SetPlayerCheckpoint(playerid, 2852.0789,-1563.2421,10.4871, 4);
  3190. CP[playerid]=504;
  3191. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: East Los Santos - Las Colinas - Jefferson - Glen Park - Downtown - Market\n{808080}Następny przystanek: Baza Mechaników");
  3192. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Willowfield – Myjnia Samochodowa", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3193. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3194. _MruGracz(playerid, "+270$");
  3195. }
  3196. else if(CP[playerid]==504)
  3197. {
  3198. DisablePlayerCheckpoint(playerid);
  3199. SetPlayerCheckpoint(playerid, 2835.9119,-1100.0378,23.6009, 4);
  3200. CP[playerid]=505;
  3201. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: East Los Santos - Las Colinas - Jefferson - Glen Park - Downtown - Market\n{808080}Następny przystanek: Agencja Ochrony");
  3202. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}East Los Santos – Baza Mechaników", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3203. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3204. _MruGracz(playerid, "+270$");
  3205. }
  3206. else if(CP[playerid]==505)
  3207. {
  3208. DisablePlayerCheckpoint(playerid);
  3209. SetPlayerCheckpoint(playerid, 2541.5476,-1050.6461,68.9680, 4); //Przystanek commerce VB prawa
  3210. CP[playerid]=506;
  3211. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Las Colinas - Jefferson - Glen Park - Downtown - Market\n{808080}Następny przystanek: Las Colinas 13");
  3212. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}East Los Santos – Agencja Ochrony", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3213. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3214. _MruGracz(playerid, "+270$");
  3215. }
  3216. else if(CP[playerid]==506)
  3217. {
  3218. DisablePlayerCheckpoint(playerid);
  3219. SetPlayerCheckpoint(playerid, 2202.1843,-1011.6302,61.2425, 4);
  3220. CP[playerid]=507;
  3221. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Las Colinas - Jefferson - Glen Park - Downtown - Market\n{808080}Następny przystanek: Las Colinas 32");
  3222. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Las Colinas 13", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3223. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3224. _MruGracz(playerid, "+270$");
  3225. }
  3226. else if(CP[playerid]==507)
  3227. {
  3228. DisablePlayerCheckpoint(playerid);
  3229. SetPlayerCheckpoint(playerid, 2248.4707,-1139.6617,25.7001, 4);
  3230. CP[playerid]=508;
  3231. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Jefferson - Glen Park - Downtown - Market\n{808080}Następny przystanek: Motel Jefferson");
  3232. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Las Colinas 34", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3233. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3234. _MruGracz(playerid, "+270$");
  3235. }
  3236. else if(CP[playerid]==508)
  3237. {
  3238. DisablePlayerCheckpoint(playerid);
  3239. SetPlayerCheckpoint(playerid, 1967.2327,-1198.9353,25.2217, 4);
  3240. CP[playerid]=509;
  3241. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Glen Park - Downtown - Market\n{808080}Następny przystanek: Glen Park");
  3242. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Jefferson – Motel Jefferson", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3243. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3244. _MruGracz(playerid, "+270$");
  3245. }
  3246. else if(CP[playerid]==509)
  3247. {
  3248. DisablePlayerCheckpoint(playerid);
  3249. SetPlayerCheckpoint(playerid, 1810.9371,-1181.5383,23.2077, 4);
  3250. CP[playerid]=510;
  3251. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Downtown - Market\n{808080}Następny przystanek: Mrucznikowy Gun Shop");
  3252. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Glen Park", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3253. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3254. _MruGracz(playerid, "+270$");
  3255. }
  3256. else if(CP[playerid]==510)
  3257. {
  3258. DisablePlayerCheckpoint(playerid);
  3259. SetPlayerCheckpoint(playerid, 1449.7135,-1037.4396,23.2312, 4);// wypozyczalnia prawa
  3260. CP[playerid]=511;
  3261. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Downtown - Market\n{808080}Następny przystanek: Verte Bank");
  3262. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Downtown – Mrucznikowy Gun Shop", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3263. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3264. _MruGracz(playerid, "+270$");
  3265. }
  3266. else if(CP[playerid]==511)
  3267. {
  3268. DisablePlayerCheckpoint(playerid);
  3269. SetPlayerCheckpoint(playerid, 1193.7321,-1358.3251,12.9416, 4);
  3270. CP[playerid]=512;
  3271. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Szpital\n{778899}Trasa: Market\n{808080}Następny przystanek: SZPITAL");
  3272. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Downtown – Bank", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3273. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3274. _MruGracz(playerid, "+270$");
  3275. }
  3276. else if(CP[playerid]==512)
  3277. {
  3278. DisablePlayerCheckpoint(playerid);
  3279. SetPlayerCheckpoint(playerid, 1203.7321,-1358.3251,12.9416, 4); //Końcowy CP
  3280. CP[playerid]=1005;
  3281. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Market - Downtown - Glen Park - Jefferson - Las Colinas - East LS - Willowfield\n{808080}Odjazd nastąpi po sygnale");
  3282. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Market – Szpital", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3283. _MruGracz(playerid, "|_____________Komunikat_____________|");
  3284. _MruGracz(playerid, "Gratulacje! Ukończyłeś trasę do Mrucznik Tower! (1/2 zadania). Możesz odpocząć.");
  3285. _MruGracz(playerid, "Jeżeli chcesz jechać dalej wykonaj nawrót kierując się do kolejnego checkpointu!");
  3286. _MruGracz(playerid, "|_____________>>LSBD GPS<<_____________|");
  3287. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3288. _MruGracz(playerid, "+270$");
  3289. }
  3290. else if(CP[playerid]==1005)
  3291. {
  3292. DisablePlayerCheckpoint(playerid);
  3293. SetPlayerCheckpoint(playerid, 1452.3877,-1031.1976,23.2277, 4); //Druga strona ulicy CP
  3294. CP[playerid]=513;
  3295. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Downtown - Glen Park - Jefferson - Las Colinas - East LS - Willowfield\n{808080}Następny przystanek: Verte Bank");
  3296. ProxDetector(10.0, playerid, "Linia numer: {FF00FF}85 (różowa) {FF00FF}Kierunek ==> {ADFF2F}WYSYPISKO", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3297. TogglePlayerControllable(playerid, 1);
  3298. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3299. _MruGracz(playerid, "+270$");
  3300. }
  3301. else if(CP[playerid]==513)
  3302. {
  3303. DisablePlayerCheckpoint(playerid);
  3304. SetPlayerCheckpoint(playerid, 1781.2218,-1167.9779,23.2261, 4); //Druga strona ulicy CP
  3305. CP[playerid]=514;
  3306. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Downtown - Glen Park - Jefferson - Las Colinas - East LS - Willowfield\n{808080}Następny przystanek: Mrucznikowy Gun Shop");
  3307. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Downtown – Bank", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3308. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3309. _MruGracz(playerid, "+270$");
  3310. }
  3311. else if(CP[playerid]==514)
  3312. {
  3313. DisablePlayerCheckpoint(playerid);
  3314. SetPlayerCheckpoint(playerid, 1972.9082,-1198.7592,25.2214, 4);
  3315. CP[playerid]=515;
  3316. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Glen Park - Jefferson - Las Colinas - East LS - Willowfield\n{808080}Następny przystanek: Glen Park");
  3317. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Downtown – Mrucznikowy Gun Shop", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3318. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3319. _MruGracz(playerid, "+270$");
  3320. }
  3321. else if(CP[playerid]==515)
  3322. {
  3323. DisablePlayerCheckpoint(playerid);
  3324. SetPlayerCheckpoint(playerid, 2255.2795,-1145.6331,26.0940, 4);
  3325. CP[playerid]=516;
  3326. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Jefferson - Las Colinas - East Los Santos - Willowfield\n{808080}Następny przystanek: Motel Jefferson");
  3327. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Glen Park", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3328. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3329. _MruGracz(playerid, "+270$");
  3330. }
  3331. else if(CP[playerid]==516)
  3332. {
  3333. DisablePlayerCheckpoint(playerid);
  3334. SetPlayerCheckpoint(playerid, 2193.2642,-1012.3875,61.8830, 4);
  3335. CP[playerid]=517;
  3336. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Las Colinas - East Lost Santos - Willowfield\n{808080}Następny przystanek: Las Colinas 34");
  3337. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Jefferson – Motel Jefferson", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3338. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3339. _MruGracz(playerid, "+270$");
  3340. }
  3341. else if(CP[playerid]==517)
  3342. {
  3343. DisablePlayerCheckpoint(playerid);
  3344. SetPlayerCheckpoint(playerid, 2520.0220,-1044.3973,68.9851, 4);
  3345. CP[playerid]=518;
  3346. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Las Colinas - East Lost Santos - Willowfield\n{808080}Następny przystanek: Las Colinas 13");
  3347. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Las Colinas 34", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3348. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3349. _MruGracz(playerid, "+270$");
  3350. }
  3351. else if(CP[playerid]==518)
  3352. {
  3353. DisablePlayerCheckpoint(playerid);
  3354. SetPlayerCheckpoint(playerid, 2839.9409,-1098.3546,23.5453, 4); //wiadukt lewy
  3355. CP[playerid]=519;
  3356. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: East Lost Santos - Willowfield\n{808080}Następny przystanek: Agencja Ochrony");
  3357. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Las Colinas 13", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3358. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3359. _MruGracz(playerid, "+270$");
  3360. }
  3361. else if(CP[playerid]==519)
  3362. {
  3363. DisablePlayerCheckpoint(playerid);
  3364. SetPlayerCheckpoint(playerid, 2864.6250,-1539.0991,10.4947, 4);
  3365. CP[playerid]=520;
  3366. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: East Lost Santos - Willowfield\n{808080}Następny przystanek: Baza Mechaników");
  3367. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}East Los Santos – Agencja Ochrony", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3368. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3369. _MruGracz(playerid, "+270$");
  3370. }
  3371. else if(CP[playerid]==520)
  3372. {
  3373. DisablePlayerCheckpoint(playerid);
  3374. SetPlayerCheckpoint(playerid, 2514.7009,-1501.5859,23.8281, 4);
  3375. CP[playerid]=521;
  3376. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Willowfield\n{808080}Następny przystanek: Myjnia Samochodowa");
  3377. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}East Los Santos – Baza Mechaników", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3378. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3379. _MruGracz(playerid, "+270$");
  3380. }
  3381. else if(CP[playerid]==521)
  3382. {
  3383. DisablePlayerCheckpoint(playerid);
  3384. SetPlayerCheckpoint(playerid, 2411.1692,-1908.5591,12.9485, 4);
  3385. CP[playerid]=522;
  3386. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Willowfield\n{808080}Następny przystanek: Cluckin Bell");
  3387. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Willowfield – Myjnia", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3388. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3389. _MruGracz(playerid, "+270$");
  3390. }
  3391. else if(CP[playerid]==522)
  3392. {
  3393. DisablePlayerCheckpoint(playerid);
  3394. SetPlayerCheckpoint(playerid, 2118.5024,-1891.6978,12.9058, 4);
  3395. CP[playerid]=523;
  3396. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia nr. 85\nKierunek: Wysypisko\n{778899}Trasa: Willowfield\n{808080}Następny przystanek: WYSYPISKO");
  3397. ProxDetector(10.0, playerid, "{FFFFFF}Linia 85: {FFFF00}Przystanek {EE82EE}Willowfield – Clukin Bell", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3398. PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
  3399. _MruGracz(playerid, "+270$");
  3400. }
  3401. else if(CP[playerid]==523)
  3402. {
  3403. if(BusCzit[playerid] == 1)
  3404. {
  3405. KickEx(playerid);
  3406. }
  3407. else
  3408. {
  3409. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia ZAJ\nLinia 85 do zajezdni Ocead Docks\n{778899}Trasa: Willowfield\n{808080}Zatrzymuje się na przystankach");
  3410. ProxDetector(10.0, playerid, "Przystanek końcowy: {EE82EE}Willowfield – Wysypisko", COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  3411. _MruGracz(playerid, "|_____________Trasa linii 85 zakończona!_____________|");
  3412. _MruGracz(playerid, "Otrzymujesz 6480$ premii za dwukrotne przejechanie trasy! (24 przystanki)");
  3413. _MruGracz(playerid, "Możesz znów rozpocząć tą lub inną trasę lub zrezygnować poprzez zamknięcie menu wyboru.");
  3414. _MruGracz(playerid, "Jeżeli jednak chcesz zakończyć pracę kieruj się do zajezdni LSBD (wskazanej przez GPS).");
  3415. _MruGracz(playerid, "|_____________>>Los Santos Bus Department<<_____________|");
  3416. _MruGracz(playerid, "Skill +2");
  3417. PlayerInfo[playerid][pCarSkill] += 2;
  3418. if(GetPlayerFraction(playerid) == FRAC_KT) Sejf_Add(FRAC_KT, 6480);
  3419. else DajKase(playerid, 6480);
  3420. CP[playerid] = 0;
  3421. PlayerInfo[playerid][pLinia96] = 0;
  3422. PlayerInfo[playerid][pNatrasiejest] = 0;
  3423. ShowPlayerDialogEx(playerid, 8155, DIALOG_STYLE_LIST, "Wybierz swój kurs:", "Linia 55 -niebieska (230$/p , 9min, 21p, +2)\nLinia 72- pomarańczowa (200$/p, 6min, 15p, +1)\nLinia 96 - zielona 4s (310$/p, 8min, 24p, +1)\nLinia 82 żółta 5s (510$/p , 11min, 18p, +3)\nLinia 85 3s (270$/p , ? min, 24p, +2)\nWycieczka 5s\nPowrót do bazy\nPomoc", "Wybierz", "Wyjdz");
  3424. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLider] == 10)
  3425. {
  3426. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia ZAJ\nLinia 85 do zajezdni Ocean Docks\n{778899}Trasa: Willowfield - Ocean Docks\n{808080}Zatrzymuje się na przystankach");
  3427. SetPlayerCheckpoint(playerid, 2431.2551,-2094.0959,13.5469, 4);
  3428. CP[playerid]=1200;
  3429. }
  3430. else if(PlayerInfo[playerid][pJob] == 10)
  3431. {
  3432. Przystanek(playerid, 0xAFAFAFFF, "{FF00FF}Linia ZAJ\nLinia 85 do zajezdni Commerce\n{778899}Trasa: Willowfield - Idlewood - Pershing Square - Commerce\n{808080}Zatrzymuje się na przystankach");
  3433. SetPlayerCheckpoint(playerid, 1138.5,-1738.3,13.5, 4);
  3434. CP[playerid]=1201;
  3435. }
  3436. }
  3437. }
  3438. }
  3439. //koniec linii 85 i system autobusów
  3440. else if(CP[playerid]==1)
  3441. {
  3442. if(IsPlayerInAnyVehicle(playerid))
  3443. {
  3444. PlayerInfo[playerid][pJackSkill] ++;
  3445. if(PlayerInfo[playerid][pJackSkill] == 50)
  3446. { _MruGracz(playerid, "* Twój skill złodzieja samochodów wynosi teraz 2, będziesz więcej zarabiać oraz szybciej ukraść nowe auto."); }
  3447. else if(PlayerInfo[playerid][pJackSkill] == 100)
  3448. { _MruGracz(playerid, "* Twój skill złodzieja samochodów wynosi teraz 3, będziesz więcej zarabiać oraz szybciej ukraść nowe auto."); }
  3449. else if(PlayerInfo[playerid][pJackSkill] == 200)
  3450. { _MruGracz(playerid, "* Twój skill złodzieja samochodów wynosi teraz 4, będziesz więcej zarabiać oraz szybciej ukraść nowe auto."); }
  3451. else if(PlayerInfo[playerid][pJackSkill] == 400)
  3452. { _MruGracz(playerid, "* Twój skill złodzieja samochodów wynosi teraz 5, będziesz najwięcej zarabiać oraz najszybciej kraść auta."); }
  3453. new level = PlayerInfo[playerid][pJackSkill];
  3454. if(level >= 0 && level <= 50)
  3455. {
  3456. new rand = random(sizeof(SELLCAR1));
  3457. format(string, sizeof(string), "Sprzedałeś pojazd za $%d, następny pojazd możesz ukraść za 20 minut.", SELLCAR1[rand]);
  3458. _MruGracz(playerid, string);
  3459. DajKase(playerid, SELLCAR1[rand]);//moneycheat
  3460. PlayerInfo[playerid][pCarTime] = 600;
  3461. }
  3462. else if(level >= 51 && level <= 100)
  3463. {
  3464. new rand = random(sizeof(SELLCAR2));
  3465. format(string, sizeof(string), "Sprzedałeś pojazd za $%d, następny pojazd możesz ukraść za 18 minut.", SELLCAR2[rand]);
  3466. _MruGracz(playerid, string);
  3467. DajKase(playerid, SELLCAR2[rand]);//moneycheat
  3468. PlayerInfo[playerid][pCarTime] = 540;
  3469. }
  3470. else if(level >= 101 && level <= 200)
  3471. {
  3472. new rand = random(sizeof(SELLCAR3));
  3473. format(string, sizeof(string), "Sprzedałeś pojazd za $%d, następny pojazd możesz ukraść za 16 minut.", SELLCAR3[rand]);
  3474. _MruGracz(playerid, string);
  3475. DajKase(playerid, SELLCAR3[rand]);//moneycheat
  3476. PlayerInfo[playerid][pCarTime] = 480;
  3477. }
  3478. else if(level >= 201 && level <= 400)
  3479. {
  3480. new rand = random(sizeof(SELLCAR4));
  3481. format(string, sizeof(string), "Sprzedałeś pojazd za $%d, następny pojazd możesz ukraść za 14 minut.", SELLCAR4[rand]);
  3482. _MruGracz(playerid, string);
  3483. DajKase(playerid, SELLCAR4[rand]);//moneycheat
  3484. PlayerInfo[playerid][pCarTime] = 420;
  3485. }
  3486. else if(level >= 401)
  3487. {
  3488. new money = 6000;
  3489. format(string, sizeof(string), "Sprzedałeś pojazd za $%d, następny pojazd możesz ukraść za 12 minut.", money);
  3490. _MruGracz(playerid, string);
  3491. DajKase(playerid, money);//moneycheat
  3492. PlayerInfo[playerid][pCarTime] = 360;
  3493. }
  3494. GameTextForPlayer(playerid, "~y~Sprzedales pojazd", 2500, 1);
  3495. CP[playerid] = 0;
  3496. DisablePlayerCheckpoint(playerid);
  3497. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  3498. }
  3499. else
  3500. {
  3501. GameTextForPlayer(playerid, "Nie jestes w wozie", 5000, 1);
  3502. }
  3503. }
  3504. else if(CP[playerid] == 5)
  3505. {
  3506. GameTextForPlayer(playerid, "~y~W punkcie misji", 2500, 1);
  3507. CP[playerid] = 0;
  3508. DisablePlayerCheckpoint(playerid);
  3509. }
  3510. else if(CP[playerid] == 9)//Karting
  3511. {
  3512. GameTextForPlayer(playerid, "~r~Czekaj tutaj na wiecej gokardow", 4000, 3);
  3513. DisablePlayerCheckpoint(playerid);
  3514. }
  3515. else if(CP[playerid] == 10) { CP[playerid] = 11; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2258.7874,-2402.9712,12.7035,8.0); }
  3516. else if(CP[playerid] == 11) { CP[playerid] = 12; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2225.8755,-2461.3875,12.7190,8.0); }
  3517. else if(CP[playerid] == 12) { CP[playerid] = 13; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2276.9983,-2662.8328,12.8580,8.0); }
  3518. else if(CP[playerid] == 13) { CP[playerid] = 14; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2449.1399,-2663.0562,12.8138,8.0); }
  3519. else if(CP[playerid] == 14) { CP[playerid] = 15; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2566.9814,-2504.5686,12.7692,8.0); }
  3520. else if(CP[playerid] == 15) { CP[playerid] = 16; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2719.0520,-2503.5962,12.7706,8.0); }
  3521. else if(CP[playerid] == 16) { CP[playerid] = 17; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2720.7881,-2405.6589,12.7441,8.0); }
  3522. else if(CP[playerid] == 17) { CP[playerid] = 18; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2571.5195,-2401.1531,12.7528,8.0); }
  3523. else if(CP[playerid] == 18) { CP[playerid] = 19; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2406.6995,-2423.1182,12.6641,8.0); }
  3524. else if(CP[playerid] == 19) { CP[playerid] = 20; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2322.9194,-2341.5715,12.6664,8.0); }
  3525. else if(CP[playerid] == 20)//End of Karting
  3526. {
  3527. CP[playerid] = 0;
  3528. DisablePlayerCheckpoint(playerid);
  3529. GetPlayerName(playerid, name, sizeof(name));
  3530. if(FirstKartWinner == 999)
  3531. {
  3532. FirstKartWinner = playerid;
  3533. foreach(Player, i)
  3534. {
  3535. if(IsPlayerConnected(i))
  3536. {
  3537. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  3538. {
  3539. format(string, sizeof(string), "* %s ukończyłeś wyścig jako pierwszy !",name);
  3540. SendClientMessage(i, COLOR_WHITE, string);
  3541. }
  3542. }
  3543. }
  3544. }
  3545. else if(SecondKartWinner == 999)
  3546. {
  3547. SecondKartWinner = playerid;
  3548. foreach(Player, i)
  3549. {
  3550. if(IsPlayerConnected(i))
  3551. {
  3552. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  3553. {
  3554. format(string, sizeof(string), "* %s ukończyłeś wyścig jako drugi !",name);
  3555. SendClientMessage(i, COLOR_WHITE, string);
  3556. }
  3557. }
  3558. }
  3559. }
  3560. else if(ThirdKartWinner == 999)
  3561. {
  3562. ThirdKartWinner = playerid;
  3563. foreach(Player, i)
  3564. {
  3565. if(IsPlayerConnected(i))
  3566. {
  3567. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  3568. {
  3569. format(string, sizeof(string), "* %s ukończyłeś wyścig jako trzeci.",name);
  3570. SendClientMessage(i, COLOR_WHITE, string);
  3571. SendClientMessage(i, COLOR_WHITE, "** Koniec wyścigu **");
  3572. CP[i] = 0;
  3573. DisablePlayerCheckpoint(i);
  3574. }
  3575. }
  3576. }
  3577. }
  3578. }
  3579. else if(MissionCheckpoint[playerid] > 0 && PlayMission[kToggle] == 1)//Missions + Checkpoint on toggle
  3580. {
  3581. RingTone[playerid] = 20;
  3582. switch(MissionCheckpoint[playerid])
  3583. {
  3584. case 1:
  3585. {
  3586. format(string, sizeof(string), "%s", PlayMission[kGText1]);
  3587. GameTextForPlayer(playerid, string, 8000, 3);
  3588. format(string, sizeof(string), "%s", PlayMission[kText4]);
  3589. _MruGracz(playerid, string);
  3590. format(string, sizeof(string), "%s", PlayMission[kText5]);
  3591. _MruGracz(playerid, string);
  3592. format(string, sizeof(string), "%s", PlayMission[kText6]);
  3593. _MruGracz(playerid, string);
  3594. DisablePlayerCheckpoint(playerid);
  3595. SetPlayerCheckpoint(playerid, PlayMission[kCP2][0], PlayMission[kCP2][1], PlayMission[kCP2][2], 8);
  3596. MissionCheckpoint[playerid] = 2;
  3597. }
  3598. case 2:
  3599. {
  3600. format(string, sizeof(string), "%s", PlayMission[kGText2]);
  3601. GameTextForPlayer(playerid, string, 8000, 3);
  3602. format(string, sizeof(string), "%s", PlayMission[kText7]);
  3603. _MruGracz(playerid, string);
  3604. format(string, sizeof(string), "%s", PlayMission[kText8]);
  3605. _MruGracz(playerid, string);
  3606. format(string, sizeof(string), "%s", PlayMission[kText9]);
  3607. _MruGracz(playerid, string);
  3608. DisablePlayerCheckpoint(playerid);
  3609. SetPlayerCheckpoint(playerid, PlayMission[kCP3][0], PlayMission[kCP3][1], PlayMission[kCP3][2], 8);
  3610. MissionCheckpoint[playerid] = 3;
  3611. }
  3612. case 3:
  3613. {
  3614. format(string, sizeof(string), "%s", PlayMission[kGText3]);
  3615. GameTextForPlayer(playerid, string, 8000, 3);
  3616. format(string, sizeof(string), "%s", PlayMission[kText10]);
  3617. _MruGracz(playerid, string);
  3618. format(string, sizeof(string), "%s", PlayMission[kText11]);
  3619. _MruGracz(playerid, string);
  3620. format(string, sizeof(string), "%s", PlayMission[kText12]);
  3621. _MruGracz(playerid, string);
  3622. DisablePlayerCheckpoint(playerid);
  3623. SetPlayerCheckpoint(playerid, PlayMission[kCP4][0], PlayMission[kCP4][1], PlayMission[kCP4][2], 8);
  3624. MissionCheckpoint[playerid] = 4;
  3625. }
  3626. case 4:
  3627. {
  3628. format(string, sizeof(string), "%s", PlayMission[kGText4]);
  3629. GameTextForPlayer(playerid, string, 8000, 3);
  3630. format(string, sizeof(string), "%s", PlayMission[kText13]);
  3631. _MruGracz(playerid, string);
  3632. format(string, sizeof(string), "%s", PlayMission[kText14]);
  3633. _MruGracz(playerid, string);
  3634. format(string, sizeof(string), "%s", PlayMission[kText15]);
  3635. _MruGracz(playerid, string);
  3636. DisablePlayerCheckpoint(playerid);
  3637. SetPlayerCheckpoint(playerid, PlayMission[kCP5][0], PlayMission[kCP5][1], PlayMission[kCP5][2], 8);
  3638. MissionCheckpoint[playerid] = 5;
  3639. }
  3640. case 5:
  3641. {
  3642. format(string, sizeof(string), "%s", PlayMission[kGText5]);
  3643. GameTextForPlayer(playerid, string, 8000, 3);
  3644. format(string, sizeof(string), "%s", PlayMission[kText16]);
  3645. _MruGracz(playerid, string);
  3646. format(string, sizeof(string), "%s", PlayMission[kText17]);
  3647. _MruGracz(playerid, string);
  3648. format(string, sizeof(string), "%s", PlayMission[kText18]);
  3649. _MruGracz(playerid, string);
  3650. DisablePlayerCheckpoint(playerid);
  3651. SetPlayerCheckpoint(playerid, PlayMission[kCP6][0], PlayMission[kCP6][1], PlayMission[kCP6][2], 8);
  3652. MissionCheckpoint[playerid] = 6;
  3653. }
  3654. case 6:
  3655. {
  3656. format(string, sizeof(string), "%s", PlayMission[kGText6]);
  3657. GameTextForPlayer(playerid, string, 8000, 3);
  3658. format(string, sizeof(string), "..:: Ukończona Misje: %s | Zapłata: $%d ::..", PlayMission[kTitle], PlayMission[kReward]);
  3659. _MruGracz(playerid, string);
  3660. DisablePlayerCheckpoint(playerid);
  3661. DajKase(playerid, PlayMission[kReward]);//moneycheat
  3662. PlayerInfo[playerid][pMissionNr] = PlayerOnMission[playerid];
  3663. MissionCheckpoint[playerid] = 0;
  3664. PlayerOnMission[playerid] = 0;
  3665. }
  3666. }
  3667. }
  3668. else if(zawodnik[playerid] == 1)
  3669. {
  3670. if(okregi[playerid] == 5)
  3671. {
  3672. if(iloscwygranych == 0)
  3673. {
  3674. new sendername[MAX_PLAYER_NAME];
  3675. GetPlayerName(playerid, sendername, sizeof(sendername));
  3676. format(string, sizeof(string), "Wygrał %s - ukończył wyścig zajmując 1 miejsce !!!.", sendername);
  3677. ProxDetectorW(500, -1106.9854, -966.4719, 129.1807, COLOR_WHITE, string);
  3678. DisablePlayerCheckpoint(playerid);
  3679. DisablePlayerCheckpoint(playerid);
  3680. zawodnik[playerid] = 0;
  3681. okrazenia[playerid] = 0;
  3682. okregi[playerid] = 0;
  3683. iloscwygranych ++;
  3684. SetTimerEx("TablicaWynikow",1000,0,"d",playerid);
  3685. }
  3686. else if(iloscwygranych == 1)
  3687. {
  3688. new sendername[MAX_PLAYER_NAME];
  3689. GetPlayerName(playerid, sendername, sizeof(sendername));
  3690. format(string, sizeof(string), "%s ukończył wyścig zajmując 2 miejsce !!.", sendername);
  3691. ProxDetectorW(500, -1106.9854, -966.4719, 129.1807, COLOR_WHITE, string);
  3692. DisablePlayerCheckpoint(playerid);
  3693. DisablePlayerCheckpoint(playerid);
  3694. zawodnik[playerid] = 0;
  3695. okrazenia[playerid] = 0;
  3696. okregi[playerid] = 0;
  3697. iloscwygranych ++;
  3698. SetTimerEx("TablicaWynikow",1000,0,"d",playerid);
  3699. }
  3700. else if(iloscwygranych == 2)
  3701. {
  3702. new sendername[MAX_PLAYER_NAME];
  3703. GetPlayerName(playerid, sendername, sizeof(sendername));
  3704. format(string, sizeof(string), "%s ukończył wyścig zajmując 3 miejsce !.", sendername);
  3705. ProxDetectorW(500, -1106.9854, -966.4719, 129.1807, COLOR_WHITE, string);
  3706. DisablePlayerCheckpoint(playerid);
  3707. DisablePlayerCheckpoint(playerid);
  3708. zawodnik[playerid] = 0;
  3709. okrazenia[playerid] = 0;
  3710. okregi[playerid] = 0;
  3711. iloscwygranych ++;
  3712. SetTimerEx("TablicaWynikow",1000,0,"d",playerid);
  3713. }
  3714. else
  3715. {
  3716. iloscwygranych ++;
  3717. new sendername[MAX_PLAYER_NAME];
  3718. GetPlayerName(playerid, sendername, sizeof(sendername));
  3719. format(string, sizeof(string), "%s ukończył wyścig zajmując %d miejsce !.", sendername, iloscwygranych);
  3720. ProxDetectorW(500, -1106.9854, -966.4719, 129.1807, COLOR_WHITE, string);
  3721. DisablePlayerCheckpoint(playerid);
  3722. DisablePlayerCheckpoint(playerid);
  3723. zawodnik[playerid] = 0;
  3724. okrazenia[playerid] = 0;
  3725. okregi[playerid] = 0;
  3726. SetTimerEx("TablicaWynikow",1000,0,"d",playerid);
  3727. }
  3728. }
  3729. else if(okrazenia[playerid] == 0)
  3730. {
  3731. DisablePlayerCheckpoint(playerid);
  3732. SetPlayerCheckpoint(playerid, -1057.6370,-994.5727,128.8853, 5);
  3733. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  3734. okrazenia[playerid] ++;
  3735. }
  3736. else if(okrazenia[playerid] == 1)
  3737. {
  3738. DisablePlayerCheckpoint(playerid);
  3739. SetPlayerCheckpoint(playerid, -1083.9596,-975.8777,128.8853, 5);
  3740. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  3741. okrazenia[playerid] ++;
  3742. }
  3743. else if(okrazenia[playerid] == 2)
  3744. {
  3745. DisablePlayerCheckpoint(playerid);
  3746. SetPlayerCheckpoint(playerid, -1114.9780,-985.8290,128.8878, 5);
  3747. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  3748. okrazenia[playerid] ++;
  3749. }
  3750. else if(okrazenia[playerid] == 3)
  3751. {
  3752. DisablePlayerCheckpoint(playerid);
  3753. SetPlayerCheckpoint(playerid, -1115.5585,-987.0826,128.8878, 5);
  3754. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  3755. okrazenia[playerid] ++;
  3756. }
  3757. else if(okrazenia[playerid] == 4)
  3758. {
  3759. DisablePlayerCheckpoint(playerid);
  3760. SetPlayerCheckpoint(playerid, -1083.2609,-1006.3092,128.9274, 5);
  3761. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  3762. okrazenia[playerid] = 0;
  3763. okregi[playerid] ++;
  3764. }
  3765. }
  3766. else
  3767. {
  3768. switch (gPlayerCheckpointStatus[playerid])
  3769. {
  3770. case CHECKPOINT_HOME:
  3771. {
  3772. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3773. DisablePlayerCheckpoint(playerid);
  3774. gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  3775. GameTextForPlayer(playerid, "~w~Tu jest twoj~n~~y~Dom", 5000, 1);
  3776. }
  3777. }
  3778. }
  3779. #if DEBUG == 1
  3780. printf("%s[%d] OnPlayerEnterCheckpoint - end", GetNick(playerid), playerid);
  3781. #endif
  3782. return 1;
  3783. }
  3784.  
  3785. public OnPlayerLeaveCheckpoint(playerid)
  3786. {
  3787. return 1;
  3788. }
  3789.  
  3790. public OnPlayerEnterRaceCheckpoint(playerid)
  3791. {
  3792. #if DEBUG == 1
  3793. printf("%s[%d] OnPlayerEnterRaceCheckpoint - begin", GetNick(playerid), playerid);
  3794. #endif
  3795. TJD_CallRaceCheckpoint(playerid);
  3796. if(ScigaSie[playerid] != 666 && IloscCH[playerid] != 0 && Scigamy != 666)
  3797. {
  3798. if(!IsPlayerInAnyVehicle(playerid))
  3799. {
  3800. #if DEBUG == 1
  3801. printf("%s[%d] OnPlayerEnterRaceCheckpoint - end", GetNick(playerid), playerid);
  3802. #endif
  3803. return 1;
  3804. }
  3805. //
  3806. if(IloscCH[playerid] == (Wyscig[Scigamy][wCheckpointy]-1))
  3807. {
  3808. PlayerPlaySound(playerid, 1138, 0, 0, 0);
  3809. IloscCH[playerid] ++;
  3810. new ch = IloscCH[playerid];
  3811. if(Wyscig[Scigamy][wTypCH] == 0)
  3812. {
  3813. SetPlayerRaceCheckpoint(playerid,1,wCheckpoint[Scigamy][ch][0], wCheckpoint[Scigamy][ch][1], wCheckpoint[Scigamy][ch][2],0,0,0, Wyscig[Scigamy][wRozmiarCH]);
  3814. }
  3815. else
  3816. {
  3817. SetPlayerRaceCheckpoint(playerid,4,wCheckpoint[Scigamy][ch][0], wCheckpoint[Scigamy][ch][1], wCheckpoint[Scigamy][ch][2],0,0,0, Wyscig[Scigamy][wRozmiarCH]);
  3818. }
  3819. }
  3820. else if(IloscCH[playerid] == Wyscig[Scigamy][wCheckpointy])
  3821. {
  3822. DisablePlayerRaceCheckpoint(playerid);
  3823. PlayerPlaySound(playerid, 1139, 0, 0, 0);
  3824. new string[128];
  3825. //
  3826. if(Ukonczyl == 1)
  3827. {
  3828. _MruGracz(playerid, "|_________ GRATULACJE!!!! _________|");
  3829. _MruGracz(playerid, "| Ukończyłeś wyścig jako pierwszy! |");
  3830. format(string, sizeof(string), "| Otrzymujesz %d$ nagrody! |", Wyscig[Scigamy][wNagroda]); _MruGracz(playerid, string);
  3831. _MruGracz(playerid, "|__________________________________|");
  3832. DajKase(playerid, Wyscig[Scigamy][wNagroda]);
  3833. if(Ukonczyl >= IloscZawodnikow)
  3834. {
  3835. KoniecWyscigu(-2);
  3836. }
  3837. else
  3838. {
  3839. format(string, sizeof(string), "Komunikat wyścigu: {FFFFFF}%s wygrał wyścig %s", GetNick(playerid, true), Wyscig[Scigamy][wNazwa]);
  3840. foreach(Player, i)
  3841. {
  3842. if(ScigaSie[i] == Scigamy && i != playerid)
  3843. {
  3844. SendClientMessage(i, COLOR_YELLOW, "|_________ UWAGA!!!! _________|");
  3845. SendClientMessage(i, COLOR_YELLOW, string);
  3846. }
  3847. }
  3848. Ukonczyl++;
  3849. }
  3850. }
  3851. else
  3852. {
  3853. if(Ukonczyl >= IloscZawodnikow)
  3854. {
  3855. _MruGracz(playerid, "Ukończyłeś wyścig jako ostatni - cienias!");
  3856. format(string, sizeof(string), "Komunikat wyścigu: {FFFFFF}%s ukończył wyścig jako ostatni !", GetNick(playerid, true));
  3857. WyscigMessage(COLOR_YELLOW, string);
  3858. KoniecWyscigu(-2);
  3859. }
  3860. else
  3861. {
  3862. format(string, sizeof(string), "Ukończyłeś wyścig jako %d !", Ukonczyl);
  3863. _MruGracz(playerid, string);
  3864. format(string, sizeof(string), "Komunikat wyścigu: {FFFFFF}%s ukończył wyścig jako %d !", GetNick(playerid, true), Ukonczyl);
  3865. WyscigMessage(COLOR_YELLOW, string);
  3866. Ukonczyl++;
  3867. }
  3868. }
  3869. IloscCH[playerid] = 0;
  3870. }
  3871. else
  3872. {
  3873. PlayerPlaySound(playerid, 1138, 0, 0, 0);
  3874. IloscCH[playerid] ++;
  3875. new ch = IloscCH[playerid];
  3876. SetPlayerRaceCheckpoint(playerid,Wyscig[Scigamy][wTypCH],wCheckpoint[Scigamy][ch][0], wCheckpoint[Scigamy][ch][1], wCheckpoint[Scigamy][ch][2],wCheckpoint[Scigamy][ch+1][0], wCheckpoint[Scigamy][ch+1][1], wCheckpoint[Scigamy][ch+1][2], Wyscig[Scigamy][wRozmiarCH]);
  3877. }
  3878. }
  3879. #if DEBUG == 1
  3880. printf("%s[%d] OnPlayerEnterRaceCheckpoint - end", GetNick(playerid), playerid);
  3881. #endif
  3882. return 1;
  3883. }
  3884.  
  3885. public OnPlayerLeaveRaceCheckpoint(playerid)
  3886. {
  3887. return 1;
  3888. }
  3889.  
  3890. public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  3891. {
  3892. //printf("OnPlayerSelectObject(%d, %d, %d, %d, %.2f, %.2f, %.2f) BAR %d", playerid, type, objectid, modelid, fX, fY, fZ, GetPVarInt(playerid, "Barier-id"));
  3893. return 1;
  3894. }
  3895.  
  3896. public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
  3897. {
  3898. #if DEBUG == 1
  3899. printf("%s[%d] OnPlayerEditObject - begin", GetNick(playerid), playerid);
  3900. #endif
  3901. //printf("OnPlayerEditObject(%d, %d, %d, %d, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f) BAR %d", playerid, playerobject, objectid, response, fX, fY, fZ, fRotX, fRotY, fRotZ, GetPVarInt(playerid, "Barier-id"));
  3902. if(IsValidObject(objectid))
  3903. {
  3904. if(response < EDIT_RESPONSE_UPDATE && GetPVarInt(playerid, "Barier-id") != 0)
  3905. {
  3906. new str[128];
  3907. new frac = GetPlayerFraction(playerid);
  3908. format(str, 128, "[%d]\n%s\n%s", GetPVarInt(playerid, "Barier-id")-1, FractionNames[frac],GetNick(playerid));
  3909.  
  3910. if(!IsPlayerInRangeOfPoint(playerid, 5.0, fX,fY,fZ))
  3911. {
  3912. new Float:X, Float:Y, Float:Z, Float:rox, Float:roy, Float:roz;
  3913. GetObjectRot(objectid, rox, roy, roz);
  3914. GetObjectPos(objectid, X, Y, Z);
  3915. _MruGracz(playerid-1, "Jesteś za daleko.");
  3916. BarText[frac][GetPVarInt(playerid, "Barier-id")-1] = CreateDynamic3DTextLabel(str, 0x1E90FFFF, X, Y, Z+0.3, 4.0);
  3917. SetObjectPos(objectid, X, Y, Z);
  3918. SetObjectRot(objectid, rox, roy, roz);
  3919. }
  3920. else
  3921. {
  3922. BarText[frac][GetPVarInt(playerid, "Barier-id")-1] = CreateDynamic3DTextLabel(str, 0x1E90FFFF, fX, fY, fZ+0.3, 4.0);
  3923. SetObjectPos(objectid, fX, fY, fZ);
  3924. SetObjectRot(objectid, fRotX, fRotY, fRotZ);
  3925. }
  3926. SetPVarInt(playerid, "Barier-id", 0);
  3927. }
  3928. else if(response == EDIT_RESPONSE_UPDATE && GetPVarInt(playerid, "Barier-id") != 0)
  3929. {
  3930. new Float:X, Float:Y, Float:Z, Float:rox, Float:roy, Float:roz;
  3931. GetObjectRot(objectid, rox, roy, roz);
  3932. GetObjectPos(objectid, X, Y, Z);
  3933. for(new i=0;i<MAX_PLAYERS;i++)
  3934. {
  3935. if(GetPlayerSurfingObjectID(i) == objectid)
  3936. {
  3937. SendClientMessage(i, 0xFF0000FF, "Zejdz z obiektu!!");
  3938. GetPlayerPos(i, rox, roy, roz);
  3939. SetPlayerPosEx(i, rox+0.3,roy+0.3,roz+0.2);
  3940. SetPlayerVelocity(i, 0.15, 0.12, 0.1);
  3941. }
  3942. }
  3943. if(!IsPlayerInRangeOfPoint(playerid, 5.0, fX,fY,fZ))
  3944. {
  3945. _MruGracz(playerid, "Podejdz do obiektu!");
  3946. SetObjectPos(objectid, X, Y, Z);
  3947. }
  3948. else
  3949. {
  3950. new Float:speed = VectorSize(X-fX, Y-fY, Z-fZ);
  3951. MoveObject(objectid, fX, fY, fZ, speed, fRotX, fRotY, fRotZ);
  3952. }
  3953. }
  3954. }
  3955. #if DEBUG == 1
  3956. printf("%s[%d] OnPlayerEditObject - end", GetNick(playerid), playerid);
  3957. #endif
  3958. return 1;
  3959. }
  3960.  
  3961. public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
  3962. {
  3963. #if DEBUG == 1
  3964. printf("%s[%d] OnPlayerEditDynamicObject - begin", GetNick(playerid), playerid);
  3965. #endif
  3966. if(IsValidDynamicObject(objectid))
  3967. {
  3968. if(GetPVarInt(playerid, "Allow-edit"))
  3969. {
  3970. MoveDynamicObject(objectid, x, y, z, 10.0, rx, ry, rz);
  3971. }
  3972. }
  3973. #if DEBUG == 1
  3974. printf("%s[%d] OnPlayerEditDynamicObject - end", GetNick(playerid), playerid);
  3975. #endif
  3976. }
  3977.  
  3978. forward MySQL_DoForceGMX();
  3979. public MySQL_DoForceGMX()
  3980. {
  3981. SendRconCommand("gmx");
  3982. }
  3983.  
  3984. new bool:GMX_needed=false;
  3985. public MySQL_Close()
  3986. {
  3987. if(GMX_needed) SetTimer("MySQL_DoForceGMX", 500, 0);
  3988. else mysql_close();
  3989. }
  3990.  
  3991. public OnRconLoginAttempt(ip[], password[], success)
  3992. {
  3993. #if DEBUG == 1
  3994. printf("OnRconLoginAttempt - begin");
  3995. #endif
  3996. new player=-1;
  3997. new pip[16];
  3998. for(new i=0; i<MAX_PLAYERS; i++)
  3999. {
  4000. GetPlayerIp(i, pip, sizeof(pip));
  4001. if(strcmp(ip, pip, true)==0)
  4002. {
  4003. player=i;
  4004. break;
  4005. }
  4006. }
  4007. if(!success)
  4008. {
  4009. if(player != -1)
  4010. {
  4011. SendClientMessage(player, COLOR_PANICRED, "Otrzymujesz kicka z powodu nieautoryzowanej próby logowania przez RCON!");
  4012. KickEx(player);
  4013. }
  4014. }
  4015. else
  4016. {
  4017. if(player != -1)
  4018. {
  4019. new name[32]; format(name, sizeof(name), "rcon/%s", GetNick(player));
  4020. if(!dini_Exists(name))
  4021. {
  4022. new str[128];
  4023. format(str, 128, "RCON: Użytkownik %s (%d) próbował się zalogować na rcona bez wymaganych uprawnień!", GetNick(player, true), player);
  4024. SendAdminMessage(COLOR_PANICRED, str);
  4025. KickEx(player);
  4026. print(str);
  4027. #if DEBUG == 1
  4028. printf("OnRconLoginAttempt - end");
  4029. #endif
  4030. return 0;
  4031. }
  4032. else
  4033. {
  4034. SendClientMessage(player, COLOR_LIGHTBLUE, "Witaj, Rkornisto");
  4035. }
  4036. }
  4037. }
  4038. #if DEBUG == 1
  4039. printf("OnRconLoginAttempt - end");
  4040. #endif
  4041. return 1;
  4042. }
  4043.  
  4044. public OnRconCommand(cmd[])
  4045. {
  4046. print(cmd);
  4047. return 1;
  4048. }
  4049.  
  4050. public OnObjectMoved(objectid)
  4051. {
  4052. return 1;
  4053. }
  4054.  
  4055. public OnPlayerObjectMoved(playerid, objectid)
  4056. {
  4057. return 1;
  4058. }
  4059.  
  4060. public OnPlayerPickUpPickup(playerid, pickupid)
  4061. {
  4062. /*if(pickupid == pickup)
  4063. {
  4064. _MruGracz(playerid, "PICKUP 1!!!!!");
  4065. }
  4066. else if(pickupid == pickup2)
  4067. {
  4068. _MruGracz(playerid, "PICKUP 2!!!!");
  4069. }*/
  4070. return 1;
  4071. }
  4072.  
  4073. public OnPlayerSelectedMenuRow(playerid, row)
  4074. {
  4075. return 1;
  4076. }
  4077.  
  4078. public OnPlayerExitedMenu(playerid)
  4079. {
  4080. return 1;
  4081. }
  4082.  
  4083. public OnPlayerStateChange(playerid, newstate, oldstate)
  4084. {
  4085. new string[256];
  4086. //---------------------------------------------- Anti Cheat ------------------------------------//
  4087. /* if(newstate == PLAYER_STATE_DRIVER) {
  4088. if(GetPVarInt(playerid, "iLastDrive") != 0 && (gettime() - GetPVarInt(playerid, "iLastDrive")) <= 1) {
  4089. SetPVarInt(playerid, "iFlags", GetPVarInt(playerid, "iLastDrive")+1);
  4090. if(GetPVarInt(playerid, "iLastDrive") >= 2) {
  4091. format(string, 256, "%s podejrzany o tepanie aut. Dostal kicka. LVL: %d (%dh online)", GetNick(playerid), PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pConnectTime]);
  4092. SendAdminMessage(COLOR_LIGHTRED, string);
  4093. Kick(playerid);
  4094. return true;
  4095. }
  4096. }
  4097.  
  4098. SetPVarInt(playerid, "iLastDrive", gettime());
  4099. } */
  4100. if(newstate == PLAYER_STATE_DRIVER)
  4101. {
  4102. if(!ToggleSpeedo[playerid])
  4103. {
  4104. //Speedo
  4105. //Licznik 2.5
  4106. new Float:carhp;
  4107. new vehicleid = GetPlayerVehicleID(playerid);
  4108. GetVehicleHealth(vehicleid, carhp);
  4109. new Float:vel[3];
  4110. GetVehicleVelocity(vehicleid, vel[0], vel[1], vel[2]);
  4111. new Float:vSpeed = VectorSize(vel[0], vel[1], vel[2]) * 166.666666;
  4112. new pZone[MAX_ZONE_NAME];
  4113. GetPlayer2DZone(playerid, pZone, MAX_ZONE_NAME);//Dzielnica
  4114. format(string, 128,"Speed: %dkm/h~n~Paliwo: %d~n~Stan: %d%~n~GPS: %s~n~%s" ,floatround(vSpeed), floatround(Gas[vehicleid]), floatround(carhp/10), pZone, VehicleNames[GetVehicleModel(vehicleid)-400]);
  4115. PlayerTextDrawSetString(playerid, Licznik[playerid], string);
  4116. PlayerTextDrawShow(playerid, Licznik[playerid]);
  4117. }
  4118. //
  4119.  
  4120. //ACv2: Kicking players that are trying to drive the car without permission
  4121. if(newstate == PLAYER_STATE_DRIVER)
  4122. {
  4123. new vehicleid = GetPlayerVehicleID(playerid);
  4124. if(!Player::CanUseCar(playerid, vehicleid))
  4125. {
  4126. // Skurwysyn kieruje bez prawka lub autem frakcji xD
  4127.  
  4128. MruDialog(playerid, "ACv2: Kod #2001", "Zostałeś wyrzucony za kierowanie samochodem bez wymaganych uprawnień");
  4129. format(string, sizeof string, "ACv2 [#2001]: %s został wyrzucony za jazdę bez uprawnień [Veh: %d]", GetNick(playerid, true), GetPlayerVehicleID(playerid));
  4130. SendCommandLogMessage(string);
  4131.  
  4132. SetPlayerVirtualWorld(playerid, playerid+AC_WORLD);
  4133.  
  4134. KickEx(playerid);
  4135. }
  4136. }
  4137. //AT400
  4138. if(Car_GetOwnerType(GetPlayerVehicleID(playerid)) == CAR_OWNER_FRACTION && GetVehicleModel(GetPlayerVehicleID(playerid)) == 577 && !IsPlayerInFraction(playerid, FRAC_KT, 5000))
  4139. {
  4140. new Float:slx, Float:sly, Float:slz;
  4141. GetPlayerPos(playerid, slx, sly, slz);
  4142. SetPlayerPosEx(playerid, slx, sly, slz+0.2);
  4143. ClearAnimations(playerid);
  4144. }
  4145.  
  4146. TJD_CallEnterVeh(playerid, GetPlayerVehicleID(playerid));
  4147. }
  4148. else if(oldstate == PLAYER_STATE_DRIVER)
  4149. {
  4150. DisableCarBlinking(GetPVarInt(playerid, "blink-car"));
  4151. new vehicleid = GetPVarInt(playerid, "car-id");
  4152. if(VehicleUID[vehicleid][vSiren] != 0)
  4153. {
  4154. new sendername[MAX_PLAYER_NAME], komunikat[128];
  4155. DestroyDynamicObject(VehicleUID[vehicleid][vSiren]);
  4156. VehicleUID[vehicleid][vSiren] = 0;
  4157. GetPlayerName(playerid, sendername, sizeof(sendername));
  4158. format(komunikat, sizeof(komunikat), "* %s zdejmuje kogut z dachu i chowa.", sendername);
  4159. ProxDetector(30.0, playerid, komunikat, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  4160. }
  4161. if(TransportDuty[playerid] > 0) //Taxi duty
  4162. {
  4163. Taxi_FareEnd(playerid);
  4164. }
  4165. TJD_CallExitVeh(playerid);
  4166.  
  4167. if(NieSpamujKradnij[playerid] == 1 || HireCar[playerid] != 0)
  4168. {
  4169. TogglePlayerControllable(playerid, 1);
  4170. }
  4171. //Speedo
  4172. PlayerTextDrawHide(playerid, Licznik[playerid]);
  4173. //
  4174.  
  4175. #if BLINK_DISABLE_ON_EXIT_VEHICLE == 0
  4176. #else
  4177. if(BlinkSide[GetPVarInt(playerid, "blink-car")] != 2) DisableCarBlinking(GetPVarInt(playerid, "blink-car"));
  4178. #endif
  4179. }
  4180. if(oldstate == PLAYER_STATE_PASSENGER)
  4181. {
  4182. if(TransportDist[playerid] > 0.0 && TransportDriver[playerid] < 999) //Taxi client pay
  4183. {
  4184. Taxi_Pay(playerid);
  4185. }
  4186. }
  4187. if(newstate == PLAYER_STATE_ONFOOT)
  4188. {
  4189. if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
  4190. {
  4191. PlayerInKart[playerid] = 0;
  4192. KartingPlayers --;
  4193. }
  4194. }
  4195. if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
  4196. {
  4197. if(GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon(playerid) == 27 || GetPlayerWeapon(playerid) == 23)
  4198. {
  4199. SetPlayerArmedWeapon(playerid,0);
  4200. }
  4201. if(GetPVarInt(playerid, "sanlisten") == 1)
  4202. {
  4203. if(RadioSANUno[0] != EOF)
  4204. PlayAudioStreamForPlayer(playerid, RadioSANUno);
  4205. }
  4206. else if(GetPVarInt(playerid, "sanlisten") == 2)
  4207. {
  4208. if(RadioSANDos[0] != EOF)
  4209. PlayAudioStreamForPlayer(playerid, RadioSANDos);
  4210. }
  4211. new name[MAX_PLAYER_NAME];
  4212. GetPlayerName(playerid, name, sizeof(name));
  4213. new vehicleid = GetPlayerVehicleID(playerid);
  4214. foreach(Player, i)
  4215. {
  4216. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
  4217. {
  4218. if(kaska[playerid] < TransportValue[i])
  4219. {
  4220. format(string, sizeof(string), "* Potrzebujesz $%d aby wejść.", TransportValue[i]);
  4221. _MruGracz(playerid, string);
  4222. RemovePlayerFromVehicleEx(playerid);
  4223. }
  4224. else
  4225. {
  4226. if(TransportDuty[i] == 1)
  4227. {
  4228. format(string, sizeof(string), "* Stawka wynosi $%d za kilometr.", TransportValue[i]);
  4229. _MruGracz(playerid, string);
  4230. format(string, sizeof(string), "* Klient %s wszedł do Twojej taryfy.", name);
  4231. SendClientMessage(i, COLOR_LIGHTBLUE, string);
  4232. if(PlayerInfo[playerid][pLevel] < 3)
  4233. {
  4234. ZabierzKase(playerid, floatround(TransportValue[i]/2));//moneycheat
  4235. sendTipMessageEx(playerid, COLOR_LIGHTBLUE, "Jesteś nowym graczem, obowiązuje Cie rabat 50 procent na taksówkę.");
  4236. }
  4237. else
  4238. {
  4239. ZabierzKase(playerid, floatround(TransportValue[i]));//moneycheat
  4240. }
  4241. TransportMoney[i] += TransportValue[i];
  4242. SetPVarInt(playerid, "taxi-slot", GetPlayerVehicleSeat(playerid)-1);
  4243. TransportDist[i] = 0.0;
  4244. TransportDist[playerid] = 0.0;
  4245. TransportDriver[playerid] = i;
  4246. TransportClient[i][GetPVarInt(playerid, "taxi-slot")] = playerid;
  4247. Taxi_ShowHUD(playerid);
  4248. Taxi_ShowHUD(i);
  4249. }
  4250. else if(TransportDuty[i] == 2)
  4251. {
  4252. format(string, sizeof(string), "* Zapłaciłeś $%d Za bilet.", TransportValue[i]);
  4253. _MruGracz(playerid, string);
  4254. format(string, sizeof(string), "* Klient %s wszedł do autobusu i skasował bilet.", name);
  4255. SendClientMessage(i, COLOR_LIGHTBLUE, string);
  4256. ZabierzKase(playerid, TransportValue[i]);//moneycheat
  4257. TransportMoney[i] += TransportValue[i];
  4258. }
  4259. }
  4260. }
  4261. }
  4262. }
  4263. if(newstate == PLAYER_STATE_WASTED)
  4264. {
  4265. if(PoziomPoszukiwania[playerid] >= 1)
  4266. {
  4267. new price = PoziomPoszukiwania[playerid] * 500;
  4268. new price2 = PoziomPoszukiwania[playerid] * 1000;
  4269. new count;
  4270. foreach(Player, i)
  4271. {
  4272. if(IsPlayerConnected(i))
  4273. {
  4274. if(IsACop(playerid) && OnDuty[playerid] == 1)
  4275. {
  4276. PoziomPoszukiwania[playerid] = 0;
  4277. return 1;
  4278. }
  4279. if(IsACop(i) && OnDuty[i] == 1 && CrimInRange(15.0, playerid,i))
  4280. {
  4281. if(PoziomPoszukiwania[playerid] >= 6)
  4282. {
  4283. if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
  4284. {
  4285. count = 2;
  4286. }
  4287. }
  4288. else if(PoziomPoszukiwania[playerid] >= 2)
  4289. {
  4290. if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
  4291. {
  4292. count = 1;
  4293. }
  4294. }
  4295. if(PoziomPoszukiwania[playerid] >= 2)
  4296. {
  4297. format(string, sizeof(string), "~w~Niebezpieczny przestepca~r~Zabity~n~Nagroda~g~$%d", price);
  4298. SendClientMessage(i, COLOR_LIGHTBLUE, "Jeśli chcesz więcej zarobić za złapanego bandziora musisz go doprowadzić żywego do celi.");
  4299. GameTextForPlayer(i, string, 5000, 1);
  4300. ConsumingMoney[i] = 1;
  4301. DajKase(i, price);//moneycheat
  4302. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  4303. }
  4304. }
  4305. else if(PlayerInfo[i][pJob] == 1 && CrimInRange(10.0, playerid,i))
  4306. {
  4307. if(PlayerInfo[i][pDetSkill] <= 50)
  4308. {
  4309. if(PoziomPoszukiwania[playerid] == 2 || PoziomPoszukiwania[playerid] == 10)
  4310. {
  4311. if(lowcaz[i] == playerid)
  4312. {
  4313. count = 11;
  4314. lowcaz[i] = 501;
  4315. format(string, sizeof(string), "~w~Zlecenie na przestepce~r~Wykonane~n~Nagroda~g~$%d", price2);
  4316. GameTextForPlayer(i, string, 5000, 1);
  4317. PoziomPoszukiwania[i] = 0;
  4318. ClearCrime(i);
  4319. ConsumingMoney[i] = 1;
  4320. DajKase(i, price2);//moneycheat
  4321. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  4322. PlayerInfo[i][pDetSkill] ++;
  4323. PlayerInfo[i][pDetSkill] ++;
  4324. SendClientMessage(i, COLOR_GRAD2, "Skill + 2");
  4325. }
  4326. }
  4327. }
  4328. else if(PlayerInfo[i][pDetSkill] >= 51 && PlayerInfo[i][pDetSkill] < 100)
  4329. {
  4330. if(PoziomPoszukiwania[playerid] >= 2 || PoziomPoszukiwania[playerid] <= 3 || PoziomPoszukiwania[playerid] == 10)
  4331. {
  4332. if(lowcaz[i] == playerid)
  4333. {
  4334. count = 22;
  4335. lowcaz[i] = 501;
  4336. format(string, sizeof(string), "~w~Zlecenie na przestepce~r~Wykonane~n~Nagroda~g~$%d", price2);
  4337. GameTextForPlayer(i, string, 5000, 1);
  4338. PoziomPoszukiwania[i] = 0;
  4339. ClearCrime(i);
  4340. ConsumingMoney[i] = 1;
  4341. DajKase(i, price2);//moneycheat
  4342. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  4343. PlayerInfo[i][pDetSkill] ++;
  4344. PlayerInfo[i][pDetSkill] ++;
  4345. SendClientMessage(i, COLOR_GRAD2, "Skill + 2");
  4346. }
  4347. }
  4348. }
  4349. else if(PlayerInfo[i][pDetSkill] >= 101 && PlayerInfo[i][pDetSkill] < 200)
  4350. {
  4351. if(PoziomPoszukiwania[playerid] >= 2 || PoziomPoszukiwania[playerid] <= 4 || PoziomPoszukiwania[playerid] == 10)
  4352. {
  4353. if(lowcaz[i] == playerid)
  4354. {
  4355. count = 33;
  4356. lowcaz[i] = 501;
  4357. format(string, sizeof(string), "~w~Zlecenie na przestepce~r~Wykonane~n~Nagroda~g~$%d", price2);
  4358. GameTextForPlayer(i, string, 5000, 1);
  4359. PoziomPoszukiwania[i] = 0;
  4360. ClearCrime(i);
  4361. ConsumingMoney[i] = 1;
  4362. DajKase(i, price2);//moneycheat
  4363. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  4364. PlayerInfo[i][pDetSkill] ++;
  4365. PlayerInfo[i][pDetSkill] ++;
  4366. SendClientMessage(i, COLOR_GRAD2, "Skill + 2");
  4367. }
  4368. }
  4369. }
  4370. else if(PlayerInfo[i][pDetSkill] >= 201 && PlayerInfo[i][pDetSkill] < 400)
  4371. {
  4372. if(PoziomPoszukiwania[playerid] >= 2 || PoziomPoszukiwania[playerid] <= 5 || PoziomPoszukiwania[playerid] == 10)
  4373. {
  4374. if(lowcaz[i] == playerid)
  4375. {
  4376. count = 44;
  4377. lowcaz[i] = 501;
  4378. format(string, sizeof(string), "~w~Zlecenie na przestepce~r~Wykonane~n~Nagroda~g~$%d", price2);
  4379. GameTextForPlayer(i, string, 5000, 1);
  4380. PoziomPoszukiwania[i] = 0;
  4381. ClearCrime(i);
  4382. ConsumingMoney[i] = 1;
  4383. DajKase(i, price2);//moneycheat
  4384. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  4385. PlayerInfo[i][pDetSkill] ++;
  4386. PlayerInfo[i][pDetSkill] ++;
  4387. SendClientMessage(i, COLOR_GRAD2, "Skill + 2");
  4388. }
  4389. }
  4390. }
  4391. else if(PlayerInfo[i][pDetSkill] >= 400)
  4392. {
  4393. if(PoziomPoszukiwania[playerid] >= 2 || PoziomPoszukiwania[playerid] <= 7 || PoziomPoszukiwania[playerid] == 10)
  4394. {
  4395. if(lowcaz[i] == playerid)
  4396. {
  4397. count = 55;
  4398. lowcaz[i] = 501;
  4399. format(string, sizeof(string), "~w~Zlecenie na przestepce~r~Wykonane~n~Nagroda~g~$%d", price2);
  4400. GameTextForPlayer(i, string, 5000, 1);
  4401. PoziomPoszukiwania[i] = 0;
  4402. ClearCrime(i);
  4403. ConsumingMoney[i] = 1;
  4404. DajKase(i, price2);//moneycheat
  4405. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  4406. PlayerInfo[i][pDetSkill] ++;
  4407. PlayerInfo[i][pDetSkill] ++;
  4408. SendClientMessage(i, COLOR_GRAD2, "Skill + 2");
  4409. }
  4410. }
  4411. }
  4412. }
  4413. }
  4414. }
  4415. if(poscig[playerid] == 1)
  4416. {
  4417. if(PoziomPoszukiwania[playerid] >= 6)
  4418. {
  4419. count = 2;
  4420. }
  4421. else
  4422. {
  4423. count = 1;
  4424. }
  4425. }
  4426. if(count == 1 || count == 11 || count == 22 || count == 33 || count == 44 || count == 55)
  4427. {
  4428. if(!(IsACop(playerid) && OnDuty[playerid] == 1))
  4429. {
  4430. new CenaZabicia = (4000)*(PoziomPoszukiwania[playerid]);
  4431. ZabierzKase(playerid, CenaZabicia);//moneycheat
  4432. PlayerInfo[playerid][pWantedDeaths] += 1;
  4433. PlayerInfo[playerid][pJailed] = 1;
  4434. PlayerInfo[playerid][pJailTime] = (PoziomPoszukiwania[playerid])*(400);
  4435. format(string, sizeof(string), "* Jesteś w więzieniu na %d Sekund i straciłeś $%d gdyż uciekałeś lub strzelałeś do funkcjonariusza policji.", PlayerInfo[playerid][pJailTime], CenaZabicia);
  4436. _MruGracz(playerid, string);
  4437. _MruGracz(playerid, "Jeżeli nie chcesz aby taka sytuacja powtórzyła się w przyszłości, skorzystaj z usług prawnika który zbije twój WL.");
  4438. PoziomPoszukiwania[playerid] = 0;
  4439. WantLawyer[playerid] = 1;
  4440. UsunBron(playerid);
  4441. }
  4442. }
  4443. else if(count == 2)
  4444. {
  4445. if(!(IsACop(playerid) && OnDuty[playerid] == 1))
  4446. {
  4447. new CenaZabicia = (4000)*(PoziomPoszukiwania[playerid]);
  4448. ZabierzKase(playerid, CenaZabicia);//moneycheat
  4449. PlayerInfo[playerid][pWantedDeaths] += 1;
  4450. PlayerInfo[playerid][pJailed] = 2;
  4451. PlayerInfo[playerid][pJailTime] = (PoziomPoszukiwania[playerid])*(400);
  4452. format(string, sizeof(string), "* Jesteś w DeMorgan na %d Sekund i straciłeś $%d gdyż uciekałeś lub strzelałeś do funkcjonariusza policji", PlayerInfo[playerid][pJailTime], CenaZabicia);
  4453. _MruGracz(playerid, string);
  4454. _MruGracz(playerid, "Jeżeli nie chcesz aby taka sytuacja powtórzyła się w przyszłości, skorzystaj z usług prawnika który zbije twój WL.");
  4455. PoziomPoszukiwania[playerid] = 0;
  4456. UsunBron(playerid);
  4457. }
  4458. }
  4459. }
  4460. }
  4461. if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
  4462. {// 38 / 49 / 56 = SS
  4463. new newcar = GetPlayerVehicleID(playerid);
  4464.  
  4465. //NOWY SYSTEM AUT FRAKCYJNYCH I PUBLICZNYCH
  4466. if(newcar <= CAR_End) //do kradziezy
  4467. {
  4468. if(KradniecieWozu[playerid] != newcar)
  4469. {
  4470. sendTipMessageEx(playerid, COLOR_LIGHTBLUE, "Możesz ukraść ten wóz, wpisz /kradnij spróbować to zrobić lub /wyjdz aby wyjść.");
  4471. KradniecieWozu[playerid] = newcar;
  4472. if(PlayerInfo[playerid][pCarLic] == 1) TogglePlayerControllable(playerid, 0);
  4473. }
  4474. }
  4475. gLastCar[playerid] = newcar;
  4476. }
  4477. if(newstate == PLAYER_STATE_SPAWNED)
  4478. {
  4479. if(PlayerInfo[playerid][pDonateRank] > 0) { SetPlayerHealth(playerid, 100.0); }
  4480. else { SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]); }
  4481. MedicBill[playerid] = 1;
  4482. gPlayerSpawned[playerid] = 1;
  4483. }
  4484. #if DEBUG == 1
  4485. printf("%s[%d] OnPlayerStateChange - end", GetNick(playerid), playerid);
  4486. #endif
  4487. return 1;
  4488. }
  4489.  
  4490. public OnPlayerExitVehicle(playerid, vehicleid)
  4491. {
  4492. #if DEBUG == 1
  4493. printf("%s[%d] OnPlayerExitVehicle - begin", GetNick(playerid), playerid);
  4494. #endif
  4495. if(vehicleid > MAX_VEHICLES || vehicleid < 0)
  4496. {
  4497. #if DEBUG == 1
  4498. printf("%s[%d] OnPlayerExitVehicle - end", GetNick(playerid), playerid);
  4499. #endif
  4500. _MruGracz(playerid, "Warning: Exceed vehicle limit");
  4501. return 1;
  4502. }
  4503. new validseat = GetVehicleMaxPassengers(GetVehicleModel(vehicleid));
  4504. if(validseat == 0xF)
  4505. {
  4506. _MruGracz(playerid, "Warning: Invalid seat");
  4507. #if DEBUG == 1
  4508. printf("%s[%d] OnPlayerExitVehicle - end", GetNick(playerid), playerid);
  4509. #endif
  4510. return 0;
  4511. }
  4512.  
  4513. //AT400
  4514. if(Car_GetOwnerType(vehicleid) == CAR_OWNER_FRACTION && GetVehicleModel(vehicleid) == 577 && IsPlayerInFraction(playerid, FRAC_KT, 5000))
  4515. {
  4516. GameTextForPlayer(playerid, "Wracaj szybko!", 5000, 5);
  4517. SetPlayerPosEx(playerid, 0.1389+KTAir_Offsets[0],33.2975+KTAir_Offsets[1],0.5391+100+KTAir_Offsets[2]);
  4518. SetPlayerVirtualWorld(playerid, 2);
  4519. Wchodzenie(playerid);
  4520. SetCameraBehindPlayer(playerid);
  4521. }
  4522.  
  4523. if(GetPVarInt(playerid, "sanlisten") != 0)
  4524. {
  4525. StopAudioStreamForPlayer(playerid);
  4526. }
  4527. if (GetPlayerState(playerid) == 1)
  4528. {
  4529. #if DEBUG == 1
  4530. printf("%s[%d] OnPlayerExitVehicle - end", GetNick(playerid), playerid);
  4531. #endif
  4532. return 1;
  4533. }
  4534. if(gGas[playerid] == 1)
  4535. {
  4536. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Opuscil pojazd", 500, 3);
  4537. }
  4538. if(naprawiony[playerid] == 1)
  4539. {
  4540. naprawiony[playerid] = 0;
  4541. }
  4542. if(IDWymienianegoAuta[playerid] != 0)
  4543. {
  4544. IDWymienianegoAuta[playerid] = 0;
  4545. }
  4546. #if DEBUG == 1
  4547. printf("%s[%d] OnPlayerExitVehicle - end", GetNick(playerid), playerid);
  4548. #endif
  4549. return 1;
  4550. }
  4551.  
  4552. //----------------------[spawny]-----------------------------------
  4553.  
  4554. public OnPlayerRequestSpawn(playerid)
  4555. {
  4556. //Zwrócenie 0 uniemożliwi spawn.
  4557. if(GetPVarInt(playerid, "class-sel")) DeletePVar(playerid, "class-sel");
  4558. return 1;
  4559. }
  4560.  
  4561. public OnPlayerRequestClass(playerid, classid)
  4562. {
  4563. #if DEBUG == 1
  4564. printf("%s[%d] OnPlayerRequestClass - begin", GetNick(playerid), playerid);
  4565. #endif
  4566. //if(GetPlayerState(playerid) == 0) return 1;
  4567. //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
  4568. //if(LogujeSieBezKlauna[playerid] == 0)
  4569. //{
  4570. // PlayerInfo[playerid][pModel] = Peds[classid][0];
  4571. //}
  4572. //SetPlayerTeamFromClass(playerid,classid);
  4573. //SetupPlayerForClassSelection(playerid);
  4574.  
  4575.  
  4576.  
  4577. #if DEBUG == 1
  4578. printf("%s[%d] OnPlayerRequestClass - end", GetNick(playerid), playerid);
  4579. #endif
  4580. return 1;
  4581. }
  4582.  
  4583. public SetupPlayerForClassSelection(playerid)
  4584. {
  4585. #if DEBUG == 1
  4586. printf("%s[%d] SetupPlayerForClassSelection - begin", GetNick(playerid), playerid);
  4587. #endif
  4588. SetPlayerInterior(playerid,0);
  4589. SetPlayerPosEx(playerid,-1657.5237,1207.6644,13.6719);
  4590. SetPlayerFacingAngle(playerid,357.7);
  4591. SetPlayerCameraPos(playerid, -1657.4678,1211.2292,13.6781);
  4592. SetPlayerCameraLookAt(playerid,-1657.5237,1207.6644,13.6719);
  4593. #if DEBUG == 1
  4594. printf("%s[%d] SetupPlayerForClassSelection - end", GetNick(playerid), playerid);
  4595. #endif
  4596. }
  4597.  
  4598. public SetPlayerTeamFromClass(playerid,classid)
  4599. {
  4600. gTeam[playerid] = 3;
  4601. PlayerInfo[playerid][pTeam] = 3;
  4602. }
  4603.  
  4604. //----------------------[koniec]-----------------------------------
  4605.  
  4606. AntiDeAMX()
  4607. {
  4608. new a[][] = {
  4609. "Trololo (Wpierdol)",
  4610. "Brass K"
  4611. };
  4612. #pragma unused a
  4613. }
  4614.  
  4615. public OnGameModeInit()
  4616. {
  4617. #if DEBUG == 1
  4618. printf("OnGameModeInit - begin");
  4619. #endif
  4620. AntiDeAMX(); // Can't touch this
  4621. WasteDeAMXersTime(); //Hammer Time
  4622. #if defined REGEX_ON
  4623. regex_syntax(SYNTAX_PERL); //regex
  4624. regexURL = regex_exbuild("^(http(?:s)?\\:\\/\\/[a-zA-Z0-9]+(?:(?:\\.|\\-)[a-zA-Z0-9]+)+(?:\\:\\d+)?(?:\\/[\\w\\-]+)*(?:\\/?|\\/\\w+\\.[a-zA-Z]{2,4}(?:\\?[\\w]+\\=[\\w\\-]+)?)?(?:\\&[\\w]+\\=[\\w\\-]+)*)$");
  4625. #endif
  4626.  
  4627. SSCANF_Option(OLD_DEFAULT_NAME, 1);
  4628. Streamer_SetVisibleItems(0, 900);
  4629. Streamer_SetTickRate(50);
  4630.  
  4631. FabrykaMats::LoadLogic();
  4632. NowaWybieralka::Init();
  4633.  
  4634. //Streamer_SetTickRate(40);
  4635.  
  4636. PaniJanina = CreateActor(88, 570.63, -2031.03, 16.2, 180.0);//basen
  4637. SetActorVirtualWorld(PaniJanina, 30);
  4638. //AFK timer
  4639. for(new i; i<MAX_PLAYERS; i++)
  4640. {
  4641. afk_timer[i] = -1;
  4642. }
  4643. //Wybory:
  4644. if(dini_Exists("wybory.ini"))
  4645. {
  4646. for(new i; i<2; i++)
  4647. {
  4648. new string[12];
  4649. format(string,sizeof(string), "kandydat%d", i);
  4650. wybory[i] = dini_Int("wybory.ini", string);
  4651. }
  4652. }
  4653. else
  4654. {
  4655. dini_Create("wybory.ini");
  4656. for(new i; i<2; i++)
  4657. {
  4658. new string[12];
  4659. format(string,sizeof(string), "kandydat%d", i);
  4660. wybory[i] = dini_IntSet("wybory.ini", string, 0);
  4661. }
  4662. }
  4663. //Ustawienia BW
  4664. if(dini_Exists("Settings.ini"))
  4665. {
  4666. new ust = dini_Int("Settings.ini", "OnlyGangZones");
  4667. SetSVarInt("BW_OnlyGangZones", ust);
  4668. ust = dini_Int("Settings.ini", "Time");
  4669. SetSVarInt("BW_Time", ust);
  4670. //dini_Get("Settings.ini", "muzyka_bonehead");
  4671. SetSVarString("muzyka_bonehead", dini_Get("Settings.ini", "muzyka_bonehead"));
  4672. }
  4673. else
  4674. {
  4675. dini_Create("Settings.ini");
  4676. dini_IntSet("Settings.ini", "OnlyGangZones", 0);
  4677. dini_IntSet("Settings.ini", "Time", 180);
  4678. //dini_S("Settings.ini", "muzyka_bonehead");
  4679. dini_Set("Settings.ini", "muzyka_bonehead", "http://cp.eu4.fastcast4u.com:2199/tunein/nikoud00.pls");
  4680. SetSVarInt("BW_OnlyGangZones", 0);
  4681. SetSVarInt("BW_Time", 180);
  4682. }
  4683.  
  4684. systempozarow_init();//System Pożarów v0.1
  4685. //Mrucznik:
  4686. Ac_OnGameModeInit();//Antyczit
  4687. MruMySQL_Connect();//mysql
  4688.  
  4689. //22.06
  4690. LoadConfig();
  4691. WczytajRangi();
  4692. WczytajSkiny();
  4693. //Konfiguracja ID skryptu dla rodzin - daj -1 w bazie aby wyłączyć korzystanie ze skryptu dla slotu
  4694. Config_FamilyScript();
  4695. //
  4696. BARIERKA_Init(); //Przed limitem obiektów
  4697.  
  4698. Stworz_Obiekty();//obiekty
  4699. obiekty_OnGameModeInit();//nowe obiekty
  4700.  
  4701. ZaladujDomy();//System Domów
  4702. orgLoad();
  4703. Zone_Load();
  4704.  
  4705. ZaladujTrasy();//System wyścigów
  4706. ZaladujPickupy();
  4707. ZaladujSamochody(); //Auta do kradziezy
  4708. Zaladuj3DTexty();
  4709. ZaladujIkony();
  4710.  
  4711. //GF:
  4712. LoadBoxer();
  4713. LoadStuff();
  4714. LoadIRC();
  4715. LadujInteriory();
  4716.  
  4717. //Sejfy mysql
  4718. Sejf_Load();
  4719.  
  4720. //Ibiza
  4721. IBIZA_Reszta();
  4722.  
  4723. //Patrol Data
  4724. Patrol_Init();
  4725. LoadServerInfo(); //Informacja dla graczy np. o wylaczeniu czegos
  4726. LoadDisallowedCommands();
  4727.  
  4728. SetGameModeText("Mrucznik-RP "VERSION);
  4729.  
  4730. //13.06
  4731. LoadTXD();
  4732. //30.10
  4733. TJD_Load();
  4734. Car_Load(); //Wszystkie pojazdy MySQL
  4735.  
  4736. //noYsi
  4737. LoadPrzewinienia();
  4738.  
  4739. new string[MAX_PLAYER_NAME];
  4740. new string1[MAX_PLAYER_NAME];
  4741. for(new c=0;c<CAR_AMOUNT;c++)
  4742. {
  4743. Gas[c] = GasMax;
  4744. SetVehicleParamsEx(c, 0, 0, 0, 0, 0, 0, 0);
  4745. }
  4746. IRCInfo[0][iPlayers] = 0; IRCInfo[1][iPlayers] = 0; IRCInfo[2][iPlayers] = 0;
  4747. IRCInfo[3][iPlayers] = 0; IRCInfo[4][iPlayers] = 0; IRCInfo[5][iPlayers] = 0;
  4748. IRCInfo[6][iPlayers] = 0; IRCInfo[7][iPlayers] = 0; IRCInfo[8][iPlayers] = 0;
  4749. IRCInfo[9][iPlayers] = 0;
  4750. News[hTaken1] = 0; News[hTaken2] = 0; News[hTaken3] = 0; News[hTaken4] = 0; News[hTaken5] = 0;
  4751. format(string, sizeof(string), "Nothing");
  4752. strmid(News[hAdd1], string, 0, strlen(string), 255);
  4753. strmid(News[hAdd2], string, 0, strlen(string), 255);
  4754. strmid(News[hAdd3], string, 0, strlen(string), 255);
  4755. strmid(News[hAdd4], string, 0, strlen(string), 255);
  4756. strmid(News[hAdd5], string, 0, strlen(string), 255);
  4757. format(string1, sizeof(string1), "Nie Ma");
  4758. strmid(News[hContact1], string1, 0, strlen(string1), 255);
  4759. strmid(News[hContact2], string1, 0, strlen(string1), 255);
  4760. strmid(News[hContact3], string1, 0, strlen(string1), 255);
  4761. strmid(News[hContact4], string1, 0, strlen(string1), 255);
  4762. strmid(News[hContact5], string1, 0, strlen(string1), 255);
  4763. PlayerHaul[78][pCapasity] = 100;
  4764. PlayerHaul[79][pCapasity] = 100;
  4765. PlayerHaul[80][pCapasity] = 50;
  4766. PlayerHaul[81][pCapasity] = 50;
  4767. PlayerHaul[128][pCapasity] = 300;
  4768. PlayerHaul[129][pCapasity] = 300;
  4769. PlayerHaul[130][pCapasity] = 300;
  4770.  
  4771. format(motd, sizeof(motd), "Witaj na serwerze Mrucznik Role Play.");
  4772. gettime(ghour, gminute, gsecond);
  4773. GLOB_LastHour=ghour;
  4774. FixHour(ghour);
  4775. ghour = shifthour;
  4776. if(!realtime)
  4777. {
  4778. SetWorldTime(wtime);
  4779. ServerTime = wtime;
  4780. }
  4781. SetWeatherEx(3);
  4782. AllowInteriorWeapons(1);
  4783. ShowPlayerMarkers(0);
  4784. DisableInteriorEnterExits();
  4785. EnableStuntBonusForAll(0);
  4786. ManualVehicleEngineAndLights();
  4787. // CreatedCars check
  4788. for(new i = 0; i < sizeof(CreatedCars); i++)
  4789. {
  4790. CreatedCars[i] = 0;
  4791. }
  4792.  
  4793. // Skiny graczy (wybieralka)
  4794. for(new i = 0; i <= sizeof(Peds)-1; i++)
  4795. {
  4796. AddPlayerClass(Peds[i][0],1958.3783,1343.1572,1100.3746,269.1425,-1,-1,-1,-1,-1,-1);
  4797. }
  4798.  
  4799. if (realtime)
  4800. {
  4801. new tmphour, tmpminute, tmpsecond;
  4802. gettime(tmphour, tmpminute, tmpsecond);
  4803. SetWorldTime(tmphour);
  4804. ServerTime = tmphour;
  4805. }
  4806. //timery
  4807. SetTimer("AktywujPozar", 10800000, true);//System Pożarów v0.1
  4808. SetTimer("MainTimer", 1000, true);
  4809. //SetTimer("MySQL_Refresh", 15000, true);
  4810. //SetTimer("JednaSekundaTimer", 1000, true);//1 sekunda timer
  4811. //SetTimer("GangZone_Process", 1750, true);//OnPlayerEnterGangZone / OnPlayerLeaveGangZone
  4812. //SetTimer("SyncUp", 60000, 1);//1min
  4813. //SetTimer("SetPlayerUnjail", 1000, 1);//1sek - wywalić
  4814. //SetTimer("CarCheck", 30000, 1);//30sek - wywalić
  4815. //SetTimer("CustomPickups", 2000, 1);//2sek - wywalić
  4816. //SetTimer("Spectator", 2000, 1);//2sek - wywalić
  4817. //SetTimer("IdleKick", idletime, 1);//ildetime sek
  4818. //SetTimer("Production", 300000, 1); //5 mins (300 000)
  4819. //SetTimer("AccountSave", 900000, 1); //15min acc save
  4820. //SetTimer("SaveAccounts", 1800000, 1); //30 mins every account saved
  4821. //SetTimer("CheckGas", RunOutTime, 1);//RunOutTime sek - ???
  4822. //SetTimer("VehicleUpdate", 3000, 1); //3s anty wybuch, plamy
  4823. //SetTimer("BBD_Timer", 3500, 1); //Boombox system
  4824.  
  4825. for(new i=0;i<MAX_VEHICLES;i++)
  4826. {
  4827. Blink[i][0] = -1;
  4828. Blink[i][1] = -1;
  4829. Blink[i][2] = -1;
  4830. Blink[i][3] = -1;
  4831. }
  4832. SetTimer("B_TrailerCheck", 1000, 1);
  4833.  
  4834. for(new v = 0; v < CAR_End+1; v++)
  4835. {
  4836. VehicleUID[v][vDist] = 500.000;
  4837. VehicleUID[v][vUID] = 0;
  4838. SetVehicleNumberPlate(v, "{1F9F06}M-RP");
  4839. }
  4840.  
  4841.  
  4842. //LEGAL
  4843. /*
  4844. CREATE TABLE mru_legal (
  4845. pID integer,
  4846. weapon1 integer not null,
  4847. weapon2 integer not null,
  4848. weapon3 integer not null,
  4849. weapon4 integer not null,
  4850. weapon5 integer not null,
  4851. weapon6 integer not null,
  4852. weapon7 integer not null,
  4853. weapon8 integer not null,
  4854. weapon9 integer not null,
  4855. weapon10 integer not null,
  4856. weapon11 integer not null,
  4857. weapon12 integer not null,
  4858. weapon13 integer not null,
  4859. unique (pID)
  4860. );
  4861. */
  4862.  
  4863. if((db_handle = db_open("mru.db")) == DB:0)
  4864. {
  4865. // Error
  4866. print("Failed to open a connection to \"mru.db\".");
  4867. print("Wylaczam serwer.... Powod: brak mru.db");
  4868. SendRconCommand("exit");
  4869. }
  4870. else
  4871. {
  4872. // Success
  4873. print("Successfully created a connection to \"mru.db\".");
  4874. }
  4875.  
  4876. db_free_result(db_query(db_handle, "CREATE TABLE IF NOT EXISTS mru_legal (pID integer,weapon1 integer not null,weapon2 integer not null,weapon3 integer not null,weapon4 integer not null,weapon5 integer not null,weapon6 integer not null,weapon7 integer not null,weapon8 integer not null,weapon9 integer not null,weapon10 integer not null,weapon11 integer not null,weapon12 integer not null,weapon13 integer not null,unique (pID));"));
  4877.  
  4878. db_free_result(db_query(db_handle, "CREATE TABLE IF NOT EXISTS mru_opisy(uid INTEGER PRIMARY KEY AUTOINCREMENT, text VARCHAR, owner INT, last_used INT);"));
  4879.  
  4880. db_free_result(db_query(db_handle, "CREATE TABLE IF NOT EXISTS mru_kevlar(pID integer, offsetX FLOAT, offsetY FLOAT, offsetZ FLOAT, rotX FLOAT, rotY FLOAT, rotZ FLOAT, scaleX FLOAT, scaleY FLOAT, scaleZ FLOAT);"));
  4881.  
  4882. for(new i;i<MAX_PLAYERS;i++)
  4883. {
  4884. PlayerInfo[i][pDescLabel] = Create3DTextLabel("", 0xBBACCFFF, 0.0, 0.0, 0.0, 4.0, 0, 1);
  4885. }
  4886.  
  4887. for(new i = 0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) OnPlayerConnect(i, 1);
  4888.  
  4889. pusteZgloszenia();
  4890. print("GameMode init - done!");
  4891. //SendRconCommand("reloadfs MRP/mrpshop");
  4892. //SendRconCommand("reloadfs MRP/mrpattach");
  4893. #if DEBUG == 1
  4894. printf("OnGameModeInit - end");
  4895. #endif
  4896. return 1;
  4897. }
  4898. //koniec OnGameModeInit();
  4899.  
  4900. public OnGameModeExit()
  4901. {
  4902. #if DEBUG == 1
  4903. printf("OnGameModeExit - begin");
  4904. #endif
  4905. //AFK timer
  4906. for(new i; i<MAX_PLAYERS; i++)
  4907. {
  4908. if(afk_timer[i] != -1)
  4909. KillTimer(afk_timer[i]);
  4910. }
  4911. for(new i=0;i<MAX_ORG;i++)
  4912. {
  4913. orgSave(i, ORG_SAVE_TYPE_BASIC);
  4914. orgSave(i, ORG_SAVE_TYPE_DESC);
  4915. }
  4916. for(new i=0;i<MAX_FRAC;i++)
  4917. {
  4918. Sejf_Save(i);
  4919. if(RANG_ApplyChanges[0][i]) EDIT_SaveRangs(0, i);
  4920. }
  4921. for(new i=0;i<MAX_ORG;i++)
  4922. {
  4923. SejfR_Save(i);
  4924. if(RANG_ApplyChanges[1][i]) EDIT_SaveRangs(1, i);
  4925. }
  4926. UnloadTXD();
  4927. Patrol_Unload();
  4928. TJD_Exit();
  4929. for(new i=Zone_Points[0];i<=Zone_Points[1];i++)
  4930. {
  4931. GangZoneDestroy(i);
  4932. }
  4933. for(new i=0;i<MAX_VEHICLES;i++) DisableCarBlinking(i);
  4934. for(new i = 0; i < MAX_PLAYERS; i++)
  4935. {
  4936. PlayerTextDrawDestroy(i, gCurrentPageTextDrawId[i]);
  4937. PlayerTextDrawDestroy(i, gHeaderTextDrawId[i]);
  4938. PlayerTextDrawDestroy(i, gBackgroundTextDrawId[i]);
  4939. PlayerTextDrawDestroy(i, gNextButtonTextDrawId[i]);
  4940. PlayerTextDrawDestroy(i, gPrevButtonTextDrawId[i]);
  4941.  
  4942. INT_AirTowerLS_Exit(i, true, true);
  4943. }
  4944. foreach(Player, i)
  4945. {
  4946. if(noclipdata[i][cameramode] == CAMERA_MODE_FLY) CancelFlyMode(i);
  4947. MruMySQL_SaveAccount(i, true, true);
  4948. }
  4949.  
  4950. DOF2_Exit();
  4951.  
  4952. GLOBAL_EXIT = true;
  4953. print("Serwer zostaje wyłączony.");
  4954. #if DEBUG == 1
  4955. printf("OnGameModeExit - end");
  4956. #endif
  4957. return 1;
  4958. }
  4959.  
  4960. PayDay()
  4961. {
  4962. new string[128], account,interest,playername2[MAX_PLAYER_NAME],
  4963. tmpintrate, checks, ebill;
  4964.  
  4965. foreach(Player, i)
  4966. {
  4967. if(IsPlayerConnected(i))
  4968. {
  4969. if(PlayerInfo[i][pLevel] > 0)
  4970. {
  4971. if(MoneyMessage[i]==1)
  4972. {
  4973. SendClientMessage(i, COLOR_LIGHTRED, "Nie spłaciłeś długu, wierzyciele nasłali na ciebie Policję !");
  4974. PoziomPoszukiwania[i] += 2;
  4975. SetPlayerCriminal(i,INVALID_PLAYER_ID, "Niespłacanie długu");
  4976. }
  4977. GetPlayerName(i, playername2, sizeof(playername2));
  4978. account = PlayerInfo[i][pAccount];
  4979.  
  4980. if (PlayerInfo[i][pDom] != 0)
  4981. {
  4982. if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
  4983. else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
  4984. }
  4985. else
  4986. {
  4987. if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
  4988. else { tmpintrate = 1; }
  4989. }
  4990. if(PlayerInfo[i][pPayDay] >= 5)
  4991. {
  4992. if(PlayerInfo[i][pAdmin] >= 1)
  4993. {
  4994. format(string, sizeof(string), "Admini/%s.ini", playername2);
  4995. dini_IntSet(string, "Godziny_Online", dini_Int(string, "Godziny_Online")+1 );
  4996. }
  4997. else if (PlayerInfo[i][pZG] >= 1)
  4998. {
  4999. format(string, sizeof(string), "Zaufani/%s.ini", playername2);
  5000. dini_IntSet(string, "Godziny_Online", dini_Int(string, "Godziny_Online")+1 );
  5001. }
  5002. Tax += TaxValue;//Should work for every player online
  5003. PlayerInfo[i][pAccount] -= TaxValue;
  5004. checks = PlayerInfo[i][pPayCheck];
  5005. ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
  5006. ConsumingMoney[i] = 1;
  5007. DajKase(i, checks);
  5008. if(PlayerInfo[i][pAccount] > 0)
  5009. {
  5010. PlayerInfo[i][pAccount] -= ebill;
  5011. }
  5012. else
  5013. {
  5014. ebill = 0;
  5015. }
  5016. interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
  5017. PlayerInfo[i][pExp]++;
  5018. PlayerPlayMusic(i);
  5019. if(PlayerInfo[i][pAccount] <= 100000000)
  5020. {
  5021. PlayerInfo[i][pAccount] = account+interest;
  5022. }
  5023. SendClientMessage(i, COLOR_WHITE, "|___ STAN KONTA ___|");
  5024. format(string, sizeof(string), " Wypłata: $%d Podatek: -$%d", checks, TaxValue);
  5025. SendClientMessage(i, COLOR_GRAD1, string);
  5026. if(PlayerInfo[i][pDom] != 0 || PlayerInfo[i][pPbiskey] != 255)
  5027. {
  5028. format(string, sizeof(string), " Rachunek za prąd: -$%d", ebill);
  5029. SendClientMessage(i, COLOR_GRAD1, string);
  5030. }
  5031. format(string, sizeof(string), " Stan konta: $%d", account);
  5032. SendClientMessage(i, COLOR_GRAD1, string);
  5033. if(PlayerInfo[i][pAccount] <= 100000000)
  5034. {
  5035. format(string, sizeof(string), " Odestki: 0.%d procent",tmpintrate);
  5036. SendClientMessage(i, COLOR_GRAD2, string);
  5037. format(string, sizeof(string), " Zysk z odsetek $%d", interest);
  5038. SendClientMessage(i, COLOR_GRAD3, string);
  5039. }
  5040. else
  5041. {
  5042. format(string, sizeof(string), " Podatek dochodowy: 0.0 procent");
  5043. SendClientMessage(i, COLOR_GRAD2, string);
  5044. format(string, sizeof(string), " Strata z podatku $0");
  5045. SendClientMessage(i, COLOR_GRAD3, string);
  5046. }
  5047. SendClientMessage(i, COLOR_GRAD4, "|--------------------------------------|");
  5048. format(string, sizeof(string), " Nowy Stan Konta: $%d", PlayerInfo[i][pAccount]);
  5049. SendClientMessage(i, COLOR_GRAD5, string);
  5050. format(string, sizeof(string), " Wynajem: -$%d", Dom[PlayerInfo[i][pWynajem]][hCenaWynajmu]);
  5051. SendClientMessage(i, COLOR_GRAD5, string);
  5052. format(string, sizeof(string), "~y~Wyplata");
  5053. GameTextForPlayer(i, string, 5000, 1);
  5054. PlayerInfo[i][pPayDay] = 0;
  5055. PlayerInfo[i][pPayCheck] = 0;
  5056. PlayerInfo[i][pConnectTime] += 1;
  5057. MRP_PremiumHours[i]++;
  5058. if(PlayerInfo[i][pBP] >= 1)
  5059. {
  5060. PlayerInfo[i][pBP]--;
  5061. }
  5062. if(kaska[i] >= 10000000 && PlayerInfo[i][pLevel] <= 2 || PlayerInfo[i][pAccount] >= 10000000 && PlayerInfo[i][pLevel] <= 2)
  5063. {
  5064. MruMySQL_Banuj(i, "10MLN i 1 lvl");
  5065. format(string, sizeof(string), "%s zostal zbanowany za 10mln i 1 lvl", playername2);
  5066. BanLog(string);
  5067. KickEx(i);
  5068. }
  5069. if(PlayerInfo[i][pDonateRank] > 0)
  5070. {
  5071. PlayerInfo[i][pPayDayHad] += 1;
  5072. if(PlayerInfo[i][pPayDayHad] >= 5)
  5073. {
  5074. PlayerInfo[i][pExp]++;
  5075. PlayerInfo[i][pPayDayHad] = 0;
  5076. }
  5077. }
  5078. if(PoziomPoszukiwania[i] >= 10)
  5079. {
  5080. PoziomPoszukiwania[i] = 9;
  5081. }
  5082. else if(PoziomPoszukiwania[i] == 0)
  5083. {
  5084. PoziomPoszukiwania[i] = 0;
  5085. }
  5086. else
  5087. {
  5088. PoziomPoszukiwania[i] -= 1;
  5089. format(string, sizeof(string), " Aktualny poziom poszukiwania to %d", PoziomPoszukiwania[i]);
  5090. SendClientMessage(i, COLOR_WHITE, string);
  5091. }
  5092.  
  5093. }
  5094. else
  5095. {
  5096. SendClientMessage(i, COLOR_LIGHTRED, "* Nie grasz wystarczająco długo, aby dostać wypłatę.");
  5097. }
  5098. }
  5099. }
  5100. }
  5101. printf("-> Updating GangZones");
  5102. Zone_GangUpdate(true);
  5103. printf("-> Removing Houses MapIcons");
  5104.  
  5105. for(new i; i<=dini_Int("Domy/NRD.ini", "NrDomow"); i++)
  5106. {
  5107. DestroyDynamicMapIcon(Dom[i][hIkonka]);
  5108. }
  5109. new hour,minuite,second;
  5110. new rand = random(80);
  5111. gettime(hour,minuite,second);
  5112. FixHour(hour);
  5113. if(10 <= shifthour <= 22)
  5114. {
  5115. if(rand == 0) rand = 1;
  5116. printf("-> Starting lotto");
  5117. Lotto(rand);
  5118. }
  5119. SetWeatherEx(2+random(19));
  5120. SendClientMessageToAll(COLOR_YELLOW, "Odliczanie do respawnu rozpoczęte");
  5121. BroadCast(COLOR_PANICRED, "Uwaga! Za 20 sekund nastąpi respawn nieużywanych pojazdów !");
  5122. printf("-> Doing respawn");
  5123. CountDown();
  5124. SendRconCommand("reloadlog");
  5125. SendRconCommand("reloadbans");
  5126. if(shifthour == 3)
  5127. {
  5128. SendClientMessageToAll(COLOR_YELLOW, "Trwa aktualizacja systemu domów, czas na laga");
  5129. for(new h; h <= dini_Int("Domy/NRD.ini", "NrDomow"); h++)
  5130. {
  5131. Dom[h][hData_DD] ++;
  5132. if(Dom[h][hData_DD] >= 30)
  5133. {
  5134. new domex[128];
  5135. ZlomowanieDomu(9999, h);
  5136. format(domex, sizeof(domex), "Dom nr %d zostal zezlomowany z powodu uplywu czasu");
  5137. PayLog(domex);
  5138. }
  5139. }
  5140. ZapiszDomy();
  5141. }
  5142. else if(shifthour == 4)
  5143. {
  5144. foreach(Player, i)
  5145. {
  5146. Kick(i);
  5147. }
  5148. ZapiszDomy();
  5149. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5150. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5151. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5152. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5153. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5154. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5155. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5156. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5157. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5158. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5159. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5160. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5161. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5162. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5163. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5164. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5165. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5166. SendClientMessageToAll(COLOR_YELLOW, "UWAGA!! ZARAZ NASTĄPI RESTART SERWERA!!!!");
  5167. SendClientMessageToAll(COLOR_YELLOW, "RESET");
  5168. SendRconCommand("gmx");
  5169. }
  5170. return 1;
  5171. }
  5172.  
  5173.  
  5174.  
  5175.  
  5176. public OnPlayerUpdate(playerid)
  5177. {
  5178. /*#if DEBUG == 1
  5179. printf("%s[%d] OnPlayerUpdate - begin", GetNick(playerid), playerid);
  5180. #endif*/
  5181. if(gPlayerLogged[playerid] == 0)
  5182. {
  5183. printf("Problem z Update, nick: %s", GetNick(playerid, true));
  5184. KickEx(playerid);
  5185. }
  5186.  
  5187.  
  5188.  
  5189. systempozarow_OnPlayerUpdate(playerid);//System Pożarów v0.1
  5190.  
  5191. //Anty BH PAŹDZIOCH
  5192. if(GetPVarInt(playerid, "Jumping") == 1)
  5193. {
  5194. new Float:x, Float:y, Float:z;
  5195. GetPlayerVelocity(playerid, x, y, z);
  5196. if(z > 0.05)
  5197. {
  5198. SetPlayerVelocity(playerid, x*0.4, y*0.4, z);
  5199. SetPVarInt(playerid, "Jumping", -1);
  5200. }
  5201. }
  5202.  
  5203. new veh = GetPlayerVehicleID(playerid);
  5204. if(veh != 0)
  5205. {
  5206. new model = GetVehicleModel(veh);
  5207. if(model == 425 || model == 432)
  5208. {
  5209. new keys, ud, lr;
  5210. GetPlayerKeys(playerid, keys, ud, lr);
  5211. if((keys & KEY_FIRE))
  5212. {
  5213. #if DEBUG == 1
  5214. printf("%s[%d] OnPlayerUpdate - end", GetNick(playerid), playerid);
  5215. #endif
  5216. return 0; //desycn missile
  5217. }
  5218. }
  5219. else if(model == 520)
  5220. {
  5221. new keys, ud, lr;
  5222. GetPlayerKeys(playerid, keys, ud, lr);
  5223. if((keys & KEY_ACTION))
  5224. {
  5225. #if DEBUG == 1
  5226. printf("%s[%d] OnPlayerUpdate - end", GetNick(playerid), playerid);
  5227. #endif
  5228. return 0; //desycn hydra missile
  5229. }
  5230. }
  5231. }
  5232. new vid = GetPlayerVehicleID(playerid);
  5233. if(vid > 0)
  5234. {
  5235. if(vid != LastVehicleID[playerid])
  5236. {
  5237. if(GetTickCount() - VehicleIDChangeTime[playerid] < 2000)
  5238. {
  5239. VehicleIDChanges[playerid]++;
  5240. if(VehicleIDChanges[playerid] > MAX_VEHICLE_ID_CHANGES)
  5241. {
  5242. GetPlayerPos(playerid, czitX, czitY, czitZ);
  5243. if(GetPVarInt(playerid, "ACmessaged") == 0)
  5244. {
  5245. format(acstr, 128, "%s może lagować autami i dostał kicka Użyj /gotoczit aby to sprawdzić!", GetNick(playerid, true));
  5246. SendAdminMessage(COLOR_P@, acstr);
  5247. SetPVarInt(playerid, "ACmessaged", 1);
  5248. }
  5249. Kick(playerid);
  5250. return 0;
  5251. }
  5252. }
  5253. else VehicleIDChanges[playerid] = 1;
  5254. }
  5255. LastVehicleID[playerid] = vid;
  5256. VehicleIDChangeTime[playerid] = GetTickCount();
  5257. }
  5258. //
  5259. if(noclipdata[playerid][cameramode] == CAMERA_MODE_FLY)
  5260. {
  5261. new keys,ud,lr;
  5262. GetPlayerKeys(playerid,keys,ud,lr);
  5263.  
  5264. if(noclipdata[playerid][mode] && (GetTickCount() - noclipdata[playerid][lastmove] > 100))
  5265. {
  5266. // If the last move was > 100ms ago, process moving the object the players camera is attached to
  5267. MoveCamera(playerid);
  5268. }
  5269.  
  5270. // Is the players current key state different than their last keystate?
  5271. if(noclipdata[playerid][udold] != ud || noclipdata[playerid][lrold] != lr)
  5272. {
  5273. if((noclipdata[playerid][udold] != 0 || noclipdata[playerid][lrold] != 0) && ud == 0 && lr == 0)
  5274. { // All keys have been released, stop the object the camera is attached to and reset the acceleration multiplier
  5275. StopPlayerObject(playerid, noclipdata[playerid][flyobject]);
  5276. if(noclipdata[playerid][fireobject] != 0) StopObject(noclipdata[playerid][fireobject]);
  5277. noclipdata[playerid][mode] = 0;
  5278. noclipdata[playerid][accelmul] = 0.0;
  5279. }
  5280. else
  5281. { // Indicates a new key has been pressed
  5282.  
  5283. // Get the direction the player wants to move as indicated by the keys
  5284. noclipdata[playerid][mode] = GetMoveDirectionFromKeys(ud, lr);
  5285.  
  5286. // Process moving the object the players camera is attached to
  5287. MoveCamera(playerid);
  5288. }
  5289. }
  5290. noclipdata[playerid][udold] = ud; noclipdata[playerid][lrold] = lr; // Store current keys pressed for comparison next update
  5291. #if DEBUG == 1
  5292. printf("%s[%d] OnPlayerUpdate - end", GetNick(playerid), playerid);
  5293. #endif
  5294. return 0;
  5295. }
  5296. if(GetPVarInt(playerid, "oil_clear") == 1)
  5297. {
  5298. new keys, ud,lr;
  5299. GetPlayerKeys(playerid, keys, ud, lr);
  5300. if(ud == KEY_DOWN) Oil_OnPlayerPress(playerid, KEY_DOWN);
  5301. else if(ud == KEY_UP) Oil_OnPlayerPress(playerid, KEY_UP);
  5302. if(lr == KEY_RIGHT) Oil_OnPlayerPress(playerid, KEY_RIGHT*2);
  5303. else if(lr == KEY_LEFT) Oil_OnPlayerPress(playerid, KEY_LEFT*2);
  5304. }
  5305. /*#if DEBUG == 1
  5306. printf("%s[%d] OnPlayerUpdate - end", GetNick(playerid), playerid);
  5307. #endif*/
  5308. return 1;
  5309. }
  5310.  
  5311. OnPlayerRegister(playerid, password[])
  5312. {
  5313. if(IsPlayerConnected(playerid))
  5314. {
  5315. new string[128];
  5316. if(CheckAlfaNumeric(password))
  5317. {
  5318. format(string, 128, "Twoje hasło posiadało nie-alfanumeryczne znaki - nowe hasło: %s", password);
  5319. _MruGracz(playerid, string);
  5320. _MruGracz(playerid, "Zalecamy zmienić hasło poprzez /zmienhaslo");
  5321. _MruGracz(playerid, "Zalecamy zmienić hasło poprzez /zmienhaslo");
  5322. _MruGracz(playerid, "Zalecamy zmienić hasło poprzez /zmienhaslo");
  5323. _MruGracz(playerid, "Zalecamy zmienić hasło poprzez /zmienhaslo");
  5324. _MruGracz(playerid, string);
  5325. _MruGracz(playerid, "Zalecamy zmienić hasło poprzez /zmienhaslo");
  5326. }
  5327. MruMySQL_CreateAccount(playerid, password);
  5328. OnPlayerLogin(playerid, password);
  5329. }
  5330. return 1;
  5331. }
  5332.  
  5333. OnPlayerLogin(playerid, password[])
  5334. {
  5335. #if DEBUG == 1
  5336. printf("%s[%d] OnPlayerLogin - begin", GetNick(playerid), playerid);
  5337. #endif
  5338. new nick[MAX_PLAYER_NAME], string[256], oldpass[64];
  5339. GetPlayerName(playerid, nick, sizeof(nick));
  5340. new pass[64];
  5341. format(pass, 64, "%s", MruMySQL_ReturnPassword(nick));
  5342. new bool:UseMYSQL=false, bool:UseDINI=false;
  5343.  
  5344. if(strlen(pass) > 5) UseMYSQL=true;
  5345. else
  5346. {
  5347. format(oldpass, 64, "%s", password);
  5348. Encrypt(oldpass);
  5349.  
  5350. new string2[128];
  5351. new playername2[MAX_PLAYER_NAME];
  5352. GetPlayerName(playerid, playername2, sizeof(playername2));
  5353. format(string2, sizeof(string2), "%s.ini", playername2);
  5354. new File: UserFile = fopen(string2, io_read);
  5355. if ( UserFile )
  5356. {
  5357. new PassData[256];
  5358. new keytmp[256], valtmp[256];
  5359. fread( UserFile , PassData , sizeof( PassData ) );
  5360. keytmp = ini_GetKey( PassData );
  5361. if( strfind( keytmp , "Key" , true ) != -1 )
  5362. {
  5363. valtmp = ini_GetValue( PassData );
  5364. format(PlayerInfo[playerid][pKey], 32, "%s", valtmp);
  5365. strdel(PlayerInfo[playerid][pKey], strlen(PlayerInfo[playerid][pKey])-1, strlen(PlayerInfo[playerid][pKey]));
  5366. if(strcmp(PlayerInfo[playerid][pKey],oldpass, true ) == 0) UseDINI = true;
  5367. }
  5368. fclose(UserFile);
  5369. }
  5370. //Koniec dini
  5371. }
  5372. if(UseDINI)
  5373. {
  5374. if(CheckAlfaNumeric(password))
  5375. {
  5376. format(string, 128, "Twoje hasło posiadało nie-alfanumeryczne znaki - nowe hasło: %s", password);
  5377. _MruGracz(playerid, string);
  5378. _MruGracz(playerid, string);
  5379. _MruGracz(playerid, string);
  5380. _MruGracz(playerid, string);
  5381. _MruGracz(playerid, string);
  5382. _MruGracz(playerid, string);
  5383. _MruGracz(playerid, "Zalecamy zmienić hasło poprzez /zmienhaslo");
  5384. }
  5385.  
  5386. new escapepass[64];
  5387. format(escapepass, 64, "%s", password);
  5388. mysql_real_escape_string(password,escapepass);
  5389. if(strcmp(password,escapepass) != 0) //Anty non-alpha
  5390. {
  5391. _MruGracz(playerid, "UWAGA! Twoje hasło zostało zmienione, gdyż zawierało niepoprawne znaki!!");
  5392. format(string, 128, "Nowe hasło: %s", escapepass);
  5393. _MruGracz(playerid, string);
  5394. _MruGracz(playerid, string);
  5395. _MruGracz(playerid, string);
  5396. _MruGracz(playerid, string);
  5397. format(password, 64, "%s", escapepass);
  5398. printf("Zmieniono hasło dla %s", GetNick(playerid));
  5399. }
  5400. }
  5401. if((UseMYSQL && strcmp(pass,MD5_Hash(password), true ) == 0) || UseDINI)
  5402. {//poprawne hasło
  5403. MruMySQL_KonwertujBana(playerid);
  5404. if(MruMySQL_SprawdzBany(playerid)) return KickEx(playerid);
  5405. //Konwertowanie kont:
  5406. format(PlayerInfo[playerid][pKey], 64, "%s",MD5_Hash(password));
  5407. new result = MruMySQL_ConvertAccount(playerid);
  5408. if( result == 1 )
  5409. {
  5410. _MruGracz(playerid, "[SERVER] {33CCFF}Twoje konto zostało pomyślnie przekonwertowane. Życzymy miłej gry.");
  5411. format(string, 128, "UPDATE `mru_konta` SET `FMember`=0 WHERE `Nick`='%s'", GetNick(playerid));
  5412. mysql_query(string);
  5413. }
  5414. else if(result == -1)
  5415. {
  5416. //_MruGracz(playerid, "[SERVER] {33CCFF}Twoje konto jest aktualne w MySQL.");
  5417. }
  5418. else if(result == -999)
  5419. {
  5420. _MruGracz(playerid, "[SERVER] {FF0000}Sprawdź wielkosć znaków, podobny nick istnieje.");
  5421. KickEx(playerid);
  5422. return 1;
  5423. }
  5424. else if(result == 0)
  5425. {
  5426. _MruGracz(playerid, "[SERVER] {FF0000}Błąd przy konwersji konta! Zgłoś okoliczności na forum.");
  5427. KickEx(playerid);
  5428. return 1;
  5429. }
  5430.  
  5431. //----------------------------
  5432. //Ładowanie konta i zmiennych:
  5433. //----------------------------
  5434.  
  5435. if( !MruMySQL_LoadAcocount(playerid) )
  5436. {
  5437. _MruGracz(playerid, "[SERVER] {FF0000}Krytyczny błąd konta. Zgłoś zaistniałą sytuację na forum.");
  5438. printf("Nick %s posiada blad krytyczny konta (pusty rekord?)", nick);
  5439. KickEx(playerid);
  5440. return 1;
  5441. }
  5442.  
  5443. //Sprawdzanie blocków:
  5444. if(PlayerInfo[playerid][pBlock] == 1)
  5445. {
  5446. _MruGracz(playerid, "[SERVER] {FF0000}To konto jest zablokowane, nie możesz na nim grać.");
  5447. _MruGracz(playerid, "[SERVER] Jeśli uważasz, że konto zostało zablokowane niesłusznie napisz apelacje na: {33CCFF}www.Mrucznik-RP.pl");
  5448. KickEx(playerid);
  5449. return 1;
  5450. }
  5451. else if(PlayerInfo[playerid][pBlock] == 2 || PlayerInfo[playerid][pCK] == 1)
  5452. {
  5453. _MruGracz(playerid, "[SERVER] {FF0000}Ta postać jest uśmiercona, nie możesz na niej grać.");
  5454. KickEx(playerid);
  5455. return 1;
  5456. }
  5457.  
  5458. //Nadawanie pieniędzy:
  5459. ResetujKase(playerid);
  5460. DajKase(playerid,PlayerInfo[playerid][pCash]);
  5461.  
  5462. //Ustawianie na zalogowany:
  5463. gPlayerLogged[playerid] = 1;
  5464.  
  5465. Car_LoadForPlayer(playerid); //System aut
  5466.  
  5467. //Powitanie:
  5468. format(string, sizeof(string), "Witaj, %s!",nick);
  5469. _MruGracz(playerid,string);
  5470. printf("%s has logged in.",nick);
  5471. if (PlayerInfo[playerid][pDonateRank] > 0)
  5472. {
  5473. _MruGracz(playerid,"Jesteś posiadaczem {E2BA1B}Konta Premium.");
  5474. }
  5475. }
  5476. else
  5477. {//złe hasło
  5478. _MruGracz(playerid, "[SERVER] {33CCFF}Złe hasło.");
  5479.  
  5480. format(string, sizeof(string), "Nick %s jest zarejestrowany.\nZaloguj się wpisując w okienko poniżej hasło.\nJeżli nie znasz hasła do tego konta, wejdź pod innym nickiem", nick);
  5481. ShowPlayerDialogEx(playerid, 230, DIALOG_STYLE_PASSWORD, "Logowanie", string, "Zaloguj", "Wyjdź");
  5482. gPlayerLogTries[playerid] += 1;
  5483. if(gPlayerLogTries[playerid] == 3)
  5484. {
  5485. _MruGracz(playerid, "[SERVER] {33CCFF}Złe hasło. Zostajesz zkickowany.");
  5486. ShowPlayerDialogEx(playerid, 239, DIALOG_STYLE_MSGBOX, "Kick", "{FF0000}Dostałeś kicka za wpisanie złego hasła 3 razy pod rząd!", "Wyjdź", "");
  5487. KickEx(playerid);
  5488. }
  5489. return 1;
  5490. }
  5491.  
  5492. //Nadawanie początkowych itemów po rejestracji:
  5493. if(PlayerInfo[playerid][pReg] == 0)
  5494. {
  5495. PlayerInfo[playerid][pLevel] = 1;
  5496. PlayerInfo[playerid][pSHealth] = 0.0;
  5497. PlayerInfo[playerid][pHealth] = 50.0;
  5498. PlayerInfo[playerid][pPos_x] = 2246.6;
  5499. PlayerInfo[playerid][pPos_y] = -1161.9;
  5500. PlayerInfo[playerid][pPos_z] = 1029.7;
  5501. PlayerInfo[playerid][pInt] = 0;
  5502. PlayerInfo[playerid][pLocal] = 255;
  5503. PlayerInfo[playerid][pTeam] = 3;
  5504. PlayerInfo[playerid][pModel] = 136;
  5505. PlayerInfo[playerid][pPnumber] = 0;
  5506. PlayerInfo[playerid][pDom] = 0;
  5507. PlayerInfo[playerid][pPbiskey] = 255;
  5508. PlayerInfo[playerid][pAccount] = 5000;
  5509. PlayerInfo[playerid][pReg] = 1;
  5510. PlayerInfo[playerid][pDowod] = 0;
  5511. DajKase(playerid, 5000);
  5512. }
  5513.  
  5514. //Filtry na konto:
  5515. /*if(dini_Exists("Filtry.ini"))
  5516. {
  5517. new filtr;
  5518. new filtr_ip[64];
  5519. new filtr_nick[64];
  5520. new ip[16];
  5521. GetPlayerIp(playerid, ip, sizeof(ip));
  5522. for(new i = 0; i < dini_Int("Filtry.ini", "Liczba"); i++)
  5523. {
  5524. format(filtr_ip, sizeof(filtr_ip), "IP_%d", i);
  5525. if(strcmp(ip, dini_Get("Filtry.ini", filtr_ip), true) == 0)
  5526. {
  5527. format(filtr_nick, sizeof(filtr_nick), "Nick_%d", i);
  5528. if(strcmp(nick, dini_Get("Filtry.ini", filtr_nick), true) == 0)
  5529. {
  5530. _MruGracz(playerid,"SERVER: Jesteś posiadaczem filtru na konto.");
  5531. filtr = 0;
  5532. break;
  5533. }
  5534. else
  5535. {
  5536. filtr++;
  5537. }
  5538. }
  5539. }
  5540. if(filtr != 0)
  5541. {
  5542. _MruGracz(playerid,"SERVER: Zostałeś zkickowany, powód: Filtr na konto.");
  5543. _MruGracz(playerid,"SERVER: Aby go zdjąć napisz na forum www.Mrucznik-RP.pl");
  5544. KickEx(playerid);
  5545. return 1;
  5546. }
  5547. }
  5548. else
  5549. {
  5550. dini_Create("Filtry.ini");
  5551. dini_IntSet("Filtry.ini", "Liczba", 0);
  5552. }*/
  5553.  
  5554. if(PlayerInfo[playerid][pBW] == 60 || PlayerInfo[playerid][pBW] == 122 || PlayerInfo[playerid][pBW] == 123 || PlayerInfo[playerid][pBW] > 600)
  5555. {
  5556. PlayerInfo[playerid][pBW] = 0;
  5557. }
  5558.  
  5559. //Przywracanie Poziomu Poszukiwania
  5560. //Punkty karne
  5561. if (PlayerInfo[playerid][pWL] >= 10000)
  5562. {
  5563. string="\0";
  5564. new lPunkty[8];
  5565. PlayerInfo[playerid][pWL]-=10000;
  5566. valstr(string, PlayerInfo[playerid][pWL]);
  5567. if(strlen(string) == 3) strmid(lPunkty, string, 0, 1);
  5568. else if(strlen(string) == 4) strmid(lPunkty, string, 0, 2);
  5569. PlayerInfo[playerid][pPK] = strval(lPunkty);
  5570. if(strlen(string) == 3) strmid(lPunkty, string, 1, 3);
  5571. else if(strlen(string) == 4) strmid(lPunkty, string, 2, 4);
  5572. PlayerInfo[playerid][pWL] = strval(lPunkty);
  5573. }
  5574.  
  5575. if (PlayerInfo[playerid][pWL] >= 1)
  5576. {
  5577. if(PlayerInfo[playerid][pWL] > 100) PlayerInfo[playerid][pWL] = 0;
  5578. else
  5579. {
  5580. PoziomPoszukiwania[playerid] = clamp(PlayerInfo[playerid][pWL], 0, 10);
  5581. format(string, sizeof(string), "Twój poziom poszukiwania został przywrócony do %d.",PlayerInfo[playerid][pWL]);
  5582. _MruGracz(playerid,string);
  5583. }
  5584. }
  5585.  
  5586. //Niwelacje hajsu i matsów w zależności od lvl:
  5587. Niwelacje(playerid);
  5588. if(PlayerInfo[playerid][pWarns] >= 3)
  5589. {
  5590. MruMySQL_Banuj(playerid, "Limit warnów (3)");
  5591. KickEx(playerid);
  5592. return 1;
  5593. }
  5594. else if(PlayerInfo[playerid][pWarns] < 0) PlayerInfo[playerid][pWarns] = 0;
  5595.  
  5596.  
  5597. //MRP_LoadPremium(playerid);
  5598.  
  5599. premium_loadForPlayer(playerid);
  5600.  
  5601. //Odbugowywanie domów:
  5602. if(PlayerInfo[playerid][pDom] != 0)
  5603. {
  5604. NaprawSpojnoscWlascicielaDomu(playerid);
  5605. Dom[PlayerInfo[playerid][pDom]][hData_DD] = 0;
  5606. if(Dom[PlayerInfo[playerid][pDom]][hPDW] < 0) Dom[PlayerInfo[playerid][pDom]][hPDW] = 0;//naprawa wynajmu
  5607. if(Dom[PlayerInfo[playerid][pDom]][hPW] < 0) Dom[PlayerInfo[playerid][pDom]][hPW] = 0;
  5608. }
  5609.  
  5610. //Spawnowanie gracza:
  5611. SetTimerEx("AntySB", 5000, 0, "d", playerid); //by nie kickowało timer broni
  5612. AntySpawnBroni[playerid] = 5;
  5613. GUIExit[playerid] = 0;
  5614. SetPlayerVirtualWorld(playerid, 0);
  5615.  
  5616. Zone_Sync(playerid);
  5617. if(strlen(ServerInfo) > 1) TextDrawShowForPlayer(playerid, TXD_Info); //Show info
  5618.  
  5619. //Sync org
  5620. if(GetPlayerOrg(playerid) == 255) PlayerInfo[playerid][pOrg] = 0;
  5621.  
  5622. //Info o rodzinie:
  5623. if(GetPlayerOrg(playerid) != 0)
  5624. {
  5625. gPlayerOrg[playerid] = orgID(PlayerInfo[playerid][pOrg]);
  5626. if(PlayerInfo[playerid][pRank] >= 1000) gPlayerOrgLeader[playerid] = true, PlayerInfo[playerid][pRank]-=1000;
  5627.  
  5628. if(gPlayerOrg[playerid] == 0xFFFF) _MruGracz(playerid, "BŁĄD PRZYPISANIA TWOJEJ RODZINY!!!");
  5629. else if(strlen(OrgInfo[gPlayerOrg[playerid]][o_Motd]) > 3)
  5630. {
  5631. format(string, sizeof(string), "Rodzina MOTD: %s.", OrgInfo[gPlayerOrg[playerid]][o_Motd]);
  5632. _MruGracz(playerid, string);
  5633. }
  5634. if(PlayerInfo[playerid][pRank] < 0 || PlayerInfo[playerid][pRank] > 9) PlayerInfo[playerid][pRank] = 9;
  5635. }
  5636.  
  5637. //Konwersja pojazdów:
  5638. CONVERT_PlayerCar(playerid);
  5639.  
  5640. MRP_PlayerLog(playerid);
  5641.  
  5642. //Teleportacja do poprzedniej pozycji:
  5643. if (PlayerInfo[playerid][pTut] == 1)
  5644. {
  5645. if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pNewAP] > 0 || PlayerInfo[playerid][pZG] > 0)
  5646. {
  5647. if(PlayerInfo[playerid][pZG] > 0 || PlayerInfo[playerid][pNewAP] > 0)
  5648. {
  5649. SetPVarInt(playerid, "support_duty", 1);
  5650. _MruGracz(playerid, "SUPPORT: {FFFFFF}Stawiasz się na służbie nowym graczom. Aby sprawdzić zgłoszenia wpisz {00FF00}/tickets");
  5651. }
  5652. ShowPlayerDialogEx(playerid, 235, DIALOG_STYLE_INPUT, "Weryfikacja", "Logujesz się jako członek administracji. Zostajesz poproszony o wpisanie w\nponiższe pole hasła weryfikacyjnego. Pamiętaj, aby nie podawać go nikomu!", "Weryfikuj", "Wyjdź");
  5653. }
  5654. else if(PlayerInfo[playerid][pJailed] == 0)
  5655. {
  5656. lowcap[playerid] = 1;
  5657. ShowPlayerDialogEx(playerid, 1, DIALOG_STYLE_MSGBOX, "Serwer", "Czy chcesz się teleportować do poprzedniej pozycji?", "TAK", "NIE");
  5658. }
  5659. else
  5660. {
  5661. SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
  5662. SpawnPlayer(playerid);
  5663. }
  5664. }
  5665. else
  5666. {
  5667. SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
  5668. SpawnPlayer(playerid);
  5669. }
  5670. #if DEBUG == 1
  5671. printf("%s[%d] OnPlayerLogin - end", GetNick(playerid), playerid);
  5672. #endif
  5673. return 1;
  5674. }
  5675.  
  5676. public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
  5677. {
  5678. #if DEBUG == 1
  5679. printf("%s[%d] OnPlayerKeyStateChange - begin", GetNick(playerid), playerid);
  5680. #endif
  5681. //09.06.2014
  5682. if(Teleturniejstart == 1)
  5683. {
  5684. if(IsPlayerInRangeOfPoint(playerid,2,679.1998, -1336.1652, 30.3864) || IsPlayerInRangeOfPoint(playerid,2,679.9750, -1339.5018, 30.3864) || IsPlayerInRangeOfPoint(playerid,2,678.9643, -1342.8322, 30.3864))
  5685. {
  5686. if(!IsPlayerInAnyVehicle(playerid))
  5687. {
  5688. if(GetPlayerVirtualWorld(playerid) == 21)
  5689. {
  5690. if(newkeys & KEY_SPRINT)
  5691. {
  5692. if(grajacy[playerid] == 1)
  5693. {
  5694. new ImieGracza[MAX_PLAYER_NAME],string[64];
  5695. GetPlayerName(playerid, ImieGracza, sizeof(ImieGracza));
  5696. format(string, sizeof(string), "* %s naciska przycisk na stoliku",ImieGracza);
  5697. ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  5698. Teleturniejstart = 0;
  5699. grajacy[playerid] = 0;
  5700. #if DEBUG == 1
  5701. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5702. #endif
  5703. return 0;
  5704. }
  5705. }
  5706. }
  5707. }
  5708. }
  5709. }
  5710.  
  5711. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && GetPVarInt(playerid, "obezwladniony") > gettime())
  5712. {
  5713. if(HOLDING(KEY_SPRINT))
  5714. {
  5715. MruDialog(playerid, "Informacja", "Nie możesz sprintować ponieważ zostałeś obezwładniony");
  5716. }
  5717. }
  5718.  
  5719. //11.06.2014
  5720. if(PRESSED(KEY_JUMP) && Spectate[playerid] != INVALID_PLAYER_ID)
  5721. {
  5722. PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
  5723. PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
  5724. SetPlayerToTeamColor(playerid);
  5725. MedicBill[playerid] = 0;
  5726. SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], Unspec[playerid][Coords][0], Unspec[playerid][Coords][1], Unspec[playerid][Coords][2], 10.0, -1, -1, -1, -1, -1, -1);
  5727. Spectate[playerid] = INVALID_PLAYER_ID;
  5728. TogglePlayerSpectating(playerid, 0);
  5729. return 0;
  5730. }
  5731. //30.10
  5732. if(HOLDING(KEY_ANALOG_UP))
  5733. {
  5734. new veh = GetPlayerVehicleID(playerid);
  5735. if(veh != 0)
  5736. {
  5737. if(CarData[VehicleUID[veh][vUID]][c_Owner] == JOB_TRUCKER && CarData[VehicleUID[veh][vUID]][c_OwnerType] == CAR_OWNER_JOB)
  5738. {
  5739. if(GetVehicleModel(veh) == 530) TJD_TryPickup(playerid, veh);
  5740. }
  5741. }
  5742. }
  5743. //12.07 TRAIN HORN
  5744. if(PRESSED(KEY_CROUCH))
  5745. {
  5746. if(GetPVarInt(playerid, "horn") == 0)
  5747. {
  5748. new veh;
  5749. if((veh = GetPlayerVehicleID(playerid)) != 0)
  5750. {
  5751. if(GetVehicleModel(veh) == 538 || GetVehicleModel(veh) == 537)
  5752. {
  5753. if(GetPlayerVehicleSeat(playerid) == 0)
  5754. {
  5755. SetPVarInt(playerid, "horn", 1);
  5756. if(TRAIN_HornTimer == 0)
  5757. {
  5758. TRAIN_HornTimer = SetTimerEx("TRAIN_DoHorn", 500, 1, "i", veh);
  5759. TRAIN_DoHorn(veh);
  5760. #if DEBUG == 1
  5761. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5762. #endif
  5763. return 0;
  5764. }
  5765. }
  5766. }
  5767. }
  5768. }
  5769. }
  5770. else if(RELEASED(KEY_CROUCH))
  5771. {
  5772. if(GetPVarInt(playerid, "horn") == 1)
  5773. {
  5774. if(TRAIN_HornTimer != 0) KillTimer(TRAIN_HornTimer);
  5775. TRAIN_HornTimer=0;
  5776. SetPVarInt(playerid, "horn", 0);
  5777.  
  5778. foreach(Player, i)
  5779. {
  5780. if(GetPVarInt(i, "train-horn") == 1)
  5781. {
  5782. PlayerPlaySound(i, 8199, 0.0, 0.0, 0.0);
  5783. SetPVarInt(i, "train-horn", 0);
  5784. }
  5785. }
  5786. #if DEBUG == 1
  5787. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5788. #endif
  5789. return 0;
  5790. }
  5791. }
  5792. //BLINK
  5793. new veh = GetPlayerVehicleID(playerid);
  5794. if(veh != 0)
  5795. {
  5796. if(GetPlayerVehicleSeat(playerid) == 0)
  5797. {
  5798. #if BLINK_ALLOW_EMERGENCY == 1
  5799. if(PRESSED(KEY_LOOK_BEHIND))
  5800. {
  5801. if(!IsCarBlinking(veh)) SetCarBlinking(veh, 2), SetPVarInt(playerid, "blink-car", veh);
  5802. else DisableCarBlinking(veh);
  5803. }
  5804. #endif
  5805. if(PRESSED(KEY_LOOK_LEFT))
  5806. {
  5807. if(!IsCarBlinking(veh)) SetCarBlinking(veh, 0), SetPVarInt(playerid, "blink-car", veh);
  5808. else DisableCarBlinking(veh);
  5809. }
  5810. else if(PRESSED(KEY_LOOK_RIGHT))
  5811. {
  5812. if(!IsCarBlinking(veh)) SetCarBlinking(veh, 1), SetPVarInt(playerid, "blink-car", veh);
  5813. else DisableCarBlinking(veh);
  5814. }
  5815.  
  5816. if(IsCarBlinking(veh))
  5817. {
  5818. new Float:a, Float:b = BlinkR[veh];
  5819. GetVehicleZAngle(veh, a);
  5820.  
  5821. if(BlinkSide[veh] == 0)
  5822. {
  5823. b+=BLINK_TURN_ANGLE;
  5824. if(b > 360.0) b -=360.0;
  5825. if(a < b-180) a = a+360;
  5826. if(b < a-180) b = b+360;
  5827.  
  5828. if(a > b) DisableCarBlinking(veh);
  5829. }
  5830. else if(BlinkSide[veh] == 1)
  5831. {
  5832. b-=BLINK_TURN_ANGLE;
  5833. if(b < 0.0) b = 360.0 + b;
  5834. if(a < b-180) a = a+360;
  5835. if(b < a-180) b = b+360;
  5836.  
  5837. if(a < b) DisableCarBlinking(veh);
  5838. }
  5839. }
  5840. }
  5841. }
  5842. //Kolczatki
  5843. if(IsPlayerInAnyVehicle(playerid))
  5844. {
  5845. if(IsACop(playerid) && !KolDelay[veh])
  5846. {
  5847. if(IsACopCar(veh) && !IsABike(veh) && !IsAPlane(veh) && !IsABoat(veh))
  5848. {
  5849. if(PRESSED(KEY_ANALOG_DOWN)) //2
  5850. {
  5851. new id = Kolczatka_GetID();
  5852. if(id != -1)
  5853. {
  5854. new Float:h, Float:a, Float:b, Float:x, Float:y, Float:z, vehid = GetPlayerVehicleID(playerid), Float:rot;
  5855. GetVehiclePos(vehid, x, y, z);
  5856. GetVehicleZAngle(vehid, rot);
  5857. x-=2.0*floatsin(-rot, degrees);
  5858. y-=2.0*floatcos(-rot, degrees);
  5859. GetVehicleRotation(vehid, h, a, b);
  5860. if(floatabs(b) > 15.0)
  5861. {
  5862. #if DEBUG == 1
  5863. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5864. #endif
  5865. return 1;
  5866. }
  5867. //z -= 0.5;
  5868. z = (b > 0) ? (z - floatcos(b, degrees)) : (z + floatsin(b, degrees));
  5869. if(-10.0 <= b <= 10.0) z = (b>0) ? (z+ floatabs((b-10)/20)) : (z- ((b+10)/20));
  5870. KolID[id] = CreateDynamicObject(2899, x, y, z, a, b, rot-90);
  5871. KolTime[id] = gettime()+KOLCZATKA_CZAS;
  5872. KolArea[id] = CreateDynamicCylinder(x, y, z-10, z+10, 4.0);
  5873. KolDelay[veh] = true;
  5874. KolVehicle[id] = veh;
  5875. #if DEBUG == 1
  5876. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5877. #endif
  5878. return 0;
  5879. }
  5880. }
  5881. }
  5882. }
  5883. }
  5884.  
  5885. //
  5886. if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
  5887. {
  5888. if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
  5889. {
  5890. SendClientMessage(playerid,0x00FFFFFF, "Próbujesz podczepić pojazd");
  5891. new Float:pX, Float:pY, Float:pZ;
  5892. GetPlayerPos(playerid,pX,pY,pZ);
  5893. new Float:vX,Float:vY,Float:vZ;
  5894. new Found=0;
  5895. new vid=0;
  5896. while((vid<MAX_VEHICLES)&&(!Found))
  5897. {
  5898. vid++;
  5899. GetVehiclePos(vid,vX,vY,vZ);
  5900. if(vid == 1) continue;
  5901. if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
  5902. {
  5903. Found=1;
  5904. if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  5905. {
  5906. DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  5907. SendClientMessage(playerid,COLOR_BROWN, "Pojazd odczepiony");
  5908. break;
  5909. }
  5910. AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
  5911. SendClientMessage(playerid,COLOR_BROWN, "Pojazd podczepiony");
  5912. }
  5913. }
  5914. if (!Found)
  5915. {
  5916. SendClientMessage(playerid,COLOR_BROWN, "Nie ma w pobliżu żadnych samochodów.");
  5917. }
  5918. #if DEBUG == 1
  5919. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5920. #endif
  5921. return 0;
  5922. }
  5923. }
  5924. /*if(newkeys & KEY_CROUCH && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
  5925. {
  5926. if((IsACop(playerid) || IsABOR(playerid) && PlayerInfo[playerid][pRank] >= 1) && OnDuty[playerid] == 1)
  5927. {
  5928. veh = GetPlayerVehicleID(playerid);
  5929. if(veh == 148 || veh == 43 || IsAKogutCar(veh))
  5930. cmd_kogut(playerid);
  5931. }
  5932. }*/
  5933. /*if(newkeys & KEY_NO && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER))//id 131072
  5934. {
  5935. if(IsACop(playerid))
  5936. {
  5937. if(IsACopCar(GetPlayerVehicleID(playerid)))
  5938. {
  5939. DopalaczPD(playerid);
  5940. }
  5941. }
  5942. }*/
  5943. if(newkeys & KEY_YES && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER))//id 131072
  5944. {
  5945. new engine, unused;
  5946. GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine , unused , unused, unused, unused, unused, unused);
  5947. if(engine == 1)
  5948. cmd_zgas(playerid);
  5949. else
  5950. cmd_odpal(playerid);
  5951. }
  5952. if(newkeys & KEY_YES && (GetPlayerState(playerid)==PLAYER_STATE_ONFOOT))
  5953. {
  5954. FabrykaMats::ActorTalk(playerid);
  5955. }
  5956. if(PRESSED(KEY_JUMP))//AntyBH
  5957. {
  5958. if(!IsPlayerInAnyVehicle(playerid))
  5959. {
  5960. if(AntyBH == 1)
  5961. {
  5962. SetPVarInt(playerid, "Jumping", 1);
  5963. }
  5964. }
  5965. }
  5966. if(newkeys - oldkeys == 40)
  5967. {
  5968. if(!IsPlayerInAnyVehicle(playerid))
  5969. {
  5970. if(WnetrzeWozu[playerid] != 0)
  5971. {
  5972. Z_WnetrzaWozu(playerid, WnetrzeWozu[playerid]);
  5973. }
  5974. else
  5975. {
  5976. for(new v; v < MAX_VEHICLES; v++)
  5977. {
  5978. new model = GetVehicleModel(v);
  5979. if(model == 484 || model == 519 || model == 553 || model == 409)
  5980. {
  5981. new Float:vehx, Float:vehy, Float:vehz;
  5982. GetVehiclePos(v, vehx, vehy, vehz);
  5983. if(IsPlayerInRangeOfPoint(playerid, 10.0, vehx, vehy, vehz))
  5984. {
  5985. if(VehicleUID[v][vIntLock] == 1)
  5986. {
  5987. Do_WnetrzaWozu(playerid, v, model);
  5988. #if DEBUG == 1
  5989. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5990. #endif
  5991. return 0;
  5992. }
  5993. else
  5994. {
  5995. _MruGracz(playerid, "Interior jest zamknięty!");
  5996. #if DEBUG == 1
  5997. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  5998. #endif
  5999. return 0;
  6000. }
  6001. }
  6002. }
  6003. }
  6004. }
  6005. }
  6006. }
  6007. /*if(PRESSED(KEY_ACTION))
  6008. {
  6009. if(IsPlayerInAnyVehicle(playerid))
  6010. {
  6011. AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  6012. }
  6013. }
  6014. if(RELEASED(KEY_ACTION))
  6015. {
  6016. if(IsPlayerInAnyVehicle(playerid))
  6017. {
  6018. RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  6019. }
  6020. }*/
  6021. if(IsPlayerInAnyVehicle(playerid))
  6022. {
  6023. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  6024. {
  6025. if (newkeys & KEY_ACTION || newkeys & KEY_FIRE)
  6026. {
  6027. new Vehid = GetPlayerVehicleID(playerid);
  6028. new ModelID[MAX_VEHICLES];
  6029. ModelID[Vehid] = GetVehicleModel(Vehid);
  6030. if( ModelID[Vehid] == 520 || ModelID[Vehid] == 432 || ModelID[Vehid] == 425)
  6031. {
  6032. ApplyAnimation(playerid,"PED","car_hookertalk ",4.1,1,1,1,1,1,1);
  6033. TogglePlayerControllable(playerid,0);
  6034. TogglePlayerControllable(playerid,1);
  6035. }
  6036. }
  6037. }
  6038. }
  6039. if(PRESSED(KEY_SECONDARY_ATTACK))
  6040. {
  6041. if(GetPlayerAnimationIndex(playerid)!=1660) SetTimerEx("VendCheck", 500, false, "d", playerid);
  6042. #if DEBUG == 1
  6043. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  6044. #endif
  6045. return 0;
  6046. }
  6047. #if DEBUG == 1
  6048. printf("%s[%d] OnPlayerKeyStateChange - end", GetNick(playerid), playerid);
  6049. #endif
  6050. return 1;
  6051. }
  6052.  
  6053. public OnVehicleDeath(vehicleid, killerid)
  6054. {
  6055. #if DEBUG == 1
  6056. printf("%s[%d] OnVehicleDeath pojazd %d - begin", GetNick(killerid), killerid, vehicleid);
  6057. #endif
  6058. if(GetVehicleModel(vehicleid) == 577)
  6059. {
  6060. foreach(Player, i)
  6061. {
  6062. if(PlayerInfo[i][pWsamolocieLS]==1)
  6063. {
  6064. SendClientMessage(i, COLOR_GREY, " Samolot rozbił się!");
  6065. SetPlayerHealth(i, 0);
  6066. PlayerInfo[i][pWsamolocieLS]=0;
  6067. PlayerInfo[i][pWlociej]=0;
  6068. PlayerInfo[i][pMozeskakacAT]=0;
  6069. }
  6070. }
  6071. if(osoby>1)
  6072. {
  6073. new str[64];
  6074. format(str, 64, "Szok! Samolot KT rozbił się i zginęło %d osób!", osoby);
  6075. OOCNews(COLOR_LIGHTGREEN, str);
  6076. }
  6077. }
  6078.  
  6079. //PAŹDZIOCH
  6080. if(IsAHeliModel(GetVehicleModel(vehicleid)))
  6081. {
  6082. for(new i=0;i<=MAX_PLAYERS;i++)
  6083. {
  6084. if(GetPVarInt(i,"chop_id") == vehicleid && GetPVarInt(i,"roped") == 1)
  6085. {
  6086. DisablePlayerCheckpoint(i);
  6087. SetPVarInt(i,"roped",0);
  6088. DisablePlayerCheckpoint(i);
  6089. ClearAnimations(i);
  6090. TogglePlayerControllable(i,1);
  6091. for(new j=0;j<=ROPELENGTH;j++)
  6092. {
  6093. DestroyDynamicObject(r0pes[i][j]);
  6094. }
  6095. }
  6096. }
  6097. }
  6098.  
  6099. if(B_IsTrailer(vehicleid))
  6100. {
  6101. new veh;
  6102. if((veh = TrailerVehicle[vehicleid]) != 0)
  6103. {
  6104. if(IsCarBlinking(veh))
  6105. {
  6106. DestroyDynamicObject(Blink[veh][1]);
  6107. DestroyDynamicObject(Blink[veh][3]);
  6108. Blink[veh][1] = -1;
  6109. Blink[veh][3] = -1;
  6110. }
  6111. }
  6112. }
  6113. else DisableCarBlinking(vehicleid);
  6114.  
  6115. #if DEBUG == 1
  6116. printf("%s[%d] OnVehicleDeath pojazd %d - end", GetNick(killerid), killerid, vehicleid);
  6117. #endif
  6118. return 1;
  6119. }
  6120.  
  6121. public OnVehicleSpawn(vehicleid)
  6122. {
  6123. #if DEBUG == 1
  6124. printf("%d OnVehicleSpawn - begin", vehicleid);
  6125. #endif
  6126. if(B_IsTrailer(vehicleid))
  6127. {
  6128. new veh;
  6129. if((veh = TrailerVehicle[vehicleid]) != 0)
  6130. {
  6131. if(IsCarBlinking(veh))
  6132. {
  6133. DestroyDynamicObject(Blink[veh][1]);
  6134. DestroyDynamicObject(Blink[veh][3]);
  6135. Blink[veh][1] = -1;
  6136. Blink[veh][3] = -1;
  6137. }
  6138. }
  6139. }
  6140. else DisableCarBlinking(vehicleid);
  6141.  
  6142. TJD_CheckForUsedBox(vehicleid);
  6143.  
  6144. if(VehicleUID[vehicleid][vUID] != 0)
  6145. {
  6146. Car_AddTune(vehicleid);
  6147. SetVehicleHealth(vehicleid, CarData[VehicleUID[vehicleid][vUID]][c_HP]);
  6148. UpdateVehicleDamageStatus(vehicleid, 0, 0, 0, CarData[VehicleUID[vehicleid][vUID]][c_Tires]);
  6149. }
  6150. if(VehicleUID[vehicleid][vSiren] != 0)
  6151. {
  6152. DestroyDynamicObject(VehicleUID[vehicleid][vSiren]);
  6153. VehicleUID[vehicleid][vSiren] = 0;
  6154. }
  6155. if(Car_GetOwnerType(vehicleid) == CAR_OWNER_FRACTION || Car_GetOwnerType(vehicleid) == CAR_OWNER_FAMILY || Car_GetOwnerType(vehicleid) == CAR_OWNER_JOB) {
  6156. RepairVehicle(vehicleid); //
  6157.  
  6158. }
  6159. #if DEBUG == 1
  6160. printf("%d OnVehicleSpawn - end", vehicleid);
  6161. #endif
  6162. return 1;
  6163. }
  6164.  
  6165. public OnPlayerText(playerid, text[])
  6166. {
  6167. #if DEBUG == 1
  6168. printf("%s[%d] OnPlayerText - begin", GetNick(playerid), playerid);
  6169. #endif
  6170. if(text[0] == '@') //animacja
  6171. {
  6172. if(strlen(text) > 31) return 0;
  6173. new lVal = CallRemoteFunction("MRP_DoAnimation", "is[32]", playerid, text);
  6174. if(lVal != 1) _MruGracz(playerid, "@: Nie znaleziono animacji.");
  6175. return 0;
  6176. }
  6177.  
  6178. new giver[MAX_PLAYER_NAME];
  6179. new sendername[MAX_PLAYER_NAME];
  6180. new giveplayer[MAX_PLAYER_NAME];
  6181. new tmp[128];
  6182. new string[128];
  6183. new giveplayerid;
  6184. if(PlayerInfo[playerid][pMuted] == 1)
  6185. {
  6186. sendTipMessageEx(playerid, TEAM_CYAN_COLOR, "Nie możesz mówić gdyż jesteś uciszony");
  6187. return 0;
  6188. }
  6189. if(MarriageCeremoney[playerid] > 0)
  6190. {
  6191. if (strcmp("tak", text, true) == 0)
  6192. {
  6193. if(GotProposedBy[playerid] < 999)
  6194. {
  6195. if(IsPlayerConnected(GotProposedBy[playerid]))
  6196. {
  6197. GetPlayerName(playerid, sendername, sizeof(sendername));
  6198. GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
  6199. format(string, sizeof(string), "Ksiądz: %s czy chcesz wziąć %s na swoją żone? (wpisz 'tak', cokolwiek innego anuluje ślub).", giveplayer,sendername);
  6200. SendClientMessage(GotProposedBy[playerid], COLOR_WHITE, string);
  6201. MarriageCeremoney[GotProposedBy[playerid]] = 1;
  6202. MarriageCeremoney[playerid] = 0;
  6203. GotProposedBy[playerid] = 999;
  6204. return 1;
  6205. }
  6206. else
  6207. {
  6208. MarriageCeremoney[playerid] = 0;
  6209. GotProposedBy[playerid] = 999;
  6210. return 0;
  6211. }
  6212. }
  6213. else if(ProposedTo[playerid] < 999)
  6214. {
  6215. if(IsPlayerConnected(ProposedTo[playerid]))
  6216. {
  6217. GetPlayerName(playerid, sendername, sizeof(sendername));
  6218. GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
  6219. if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
  6220. {
  6221. format(string, sizeof(string), "Ksiądz: %s i %s zostaliście mężem i żoną, możecie się pocałować.", sendername, giveplayer);
  6222. _MruGracz(playerid, string);
  6223. format(string, sizeof(string), "Ksiądz: %s i %s zostaliście mężem i żoną, możecie się pocałować.", giveplayer, sendername);
  6224. SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
  6225. format(string, sizeof(string), "Kościół: Mamy nową pare, %s & %s zostali zaręczeni.", sendername, giveplayer);
  6226. OOCNews(COLOR_WHITE, string);
  6227. }
  6228. else if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 1)
  6229. {
  6230. format(string, sizeof(string), "Ksiądz: %s i %s Zostaliście mężem i mężem, możecie się pocałować.", sendername, giveplayer);
  6231. _MruGracz(playerid, string);
  6232. format(string, sizeof(string), "Ksiądz: %s i %s Zostaliście mężem i mężem, możecie się pocałować.", giveplayer, sendername);
  6233. SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
  6234. format(string, sizeof(string), "Kościół: Mamy nową gejowską pare, %s & %s zostali zaręczeni.", sendername, giveplayer);
  6235. OOCNews(COLOR_WHITE, string);
  6236. }
  6237. else if(PlayerInfo[playerid][pSex] == 2 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
  6238. {
  6239. format(string, sizeof(string), "Ksiądz: %s i %s Zostaliście żoną i żoną, możecie się pocałować.", sendername, giveplayer);
  6240. _MruGracz(playerid, string);
  6241. format(string, sizeof(string), "Ksiądz: %s i %s Zostaliście żoną i żoną, możecie się pocałować.", giveplayer, sendername);
  6242. SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
  6243. format(string, sizeof(string), "Kościół: Mamy nową lesbijską pare, %s & %s zostali zaręczeni.", sendername, giveplayer);
  6244. OOCNews(COLOR_WHITE, string);
  6245. }
  6246. //MarriageCeremoney[ProposedTo[playerid]] = 1;
  6247. MarriageCeremoney[ProposedTo[playerid]] = 0;
  6248. MarriageCeremoney[playerid] = 0;
  6249. format(PlayerInfo[ProposedTo[playerid]][pMarriedTo], 32, "%s", sendername);
  6250. format(PlayerInfo[playerid][pMarriedTo], 32, "%s", giveplayer);
  6251. ZabierzKase(playerid, 100000);
  6252. PlayerInfo[playerid][pMarried] = 1;
  6253. PlayerInfo[ProposedTo[playerid]][pMarried] = 1;
  6254. PlayerInfo[ProposedTo[playerid]][pPbiskey] = PlayerInfo[playerid][pPbiskey];
  6255. ProposedTo[playerid] = 999;
  6256. MarriageCeremoney[playerid] = 0;
  6257. return 1;
  6258. }
  6259. else
  6260. {
  6261. MarriageCeremoney[playerid] = 0;
  6262. ProposedTo[playerid] = 999;
  6263. return 0;
  6264. }
  6265. }
  6266. }
  6267. else
  6268. {
  6269. if(GotProposedBy[playerid] < 999)
  6270. {
  6271. if(IsPlayerConnected(GotProposedBy[playerid]))
  6272. {
  6273. GetPlayerName(playerid, sendername, sizeof(sendername));
  6274. GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
  6275. format(string, sizeof(string), "* Nie chcesz poślubić %s, nie powiedziałeś 'tak'.",giveplayer);
  6276. _MruGracz(playerid, string);
  6277. format(string, sizeof(string), "* %s nie chce cię poślubić gdyż nie powiedział 'tak'.",sendername);
  6278. SendClientMessage(GotProposedBy[playerid], COLOR_YELLOW, string);
  6279.  
  6280. MarriageCeremoney[GotProposedBy[playerid]] = 0;
  6281. return 0;
  6282. }
  6283. else
  6284. {
  6285. MarriageCeremoney[playerid] = 0;
  6286. GotProposedBy[playerid] = 999;
  6287. return 0;
  6288. }
  6289. }
  6290. else if(ProposedTo[playerid] < 999)
  6291. {
  6292. if(IsPlayerConnected(ProposedTo[playerid]))
  6293. {
  6294. GetPlayerName(playerid, sendername, sizeof(sendername));
  6295. GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
  6296. format(string, sizeof(string), "* Nie chcesz poślubić %s, nie powiedziałeś 'tak'.",giveplayer);
  6297. _MruGracz(playerid, string);
  6298. format(string, sizeof(string), "* %s nie chce cię poślubić gdyż nie powiedział 'tak'.",sendername);
  6299. SendClientMessage(ProposedTo[playerid], COLOR_YELLOW, string);
  6300.  
  6301. GotProposedBy[ProposedTo[playerid]] = 0;
  6302. return 0;
  6303. }
  6304. else
  6305. {
  6306. MarriageCeremoney[playerid] = 0;
  6307. ProposedTo[playerid] = 999;
  6308. return 0;
  6309. }
  6310. }
  6311. }
  6312. return 0;
  6313. }
  6314.  
  6315. if(ConnectedToPC[playerid] == 255)
  6316. {
  6317. new idx;
  6318. tmp = strtok(text, idx);
  6319. if ((strcmp("Contracts", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Contracts")) || (strcmp("Kontrakty", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Kontrakty")))
  6320. {
  6321. if(PlayerInfo[playerid][pRank] < 4)
  6322. {
  6323. _MruGracz(playerid, "Tylko Hitmani z 4 rangą mogą sprawdzać listę kontraktów !");
  6324. return 0;
  6325. }
  6326. SearchingHit(playerid);
  6327. return 0;
  6328. }
  6329. else if ((strcmp("News", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("News")))
  6330. {
  6331. new x_nr[128];
  6332. x_nr = strtok(text, idx);
  6333.  
  6334. if(!strlen(x_nr)) {
  6335. _MruGracz(playerid, "|__________________ Hitman Agency News __________________|");
  6336. _MruGracz(playerid, "UŻYJ: News [numer] aby skasowac 'News Delate [numer]' lub 'News delete all'");
  6337. format(string, sizeof(string), "1: %s :: Hitman: %s", News[hAdd1], News[hContact1]);
  6338. _MruGracz(playerid, string);
  6339. format(string, sizeof(string), "2: %s :: Hitman: %s", News[hAdd2], News[hContact2]);
  6340. _MruGracz(playerid, string);
  6341. format(string, sizeof(string), "3: %s :: Hitman: %s", News[hAdd3], News[hContact3]);
  6342. _MruGracz(playerid, string);
  6343. format(string, sizeof(string), "4: %s :: Hitman: %s", News[hAdd4], News[hContact4]);
  6344. _MruGracz(playerid, string);
  6345. format(string, sizeof(string), "5: %s :: Hitman: %s", News[hAdd5], News[hContact5]);
  6346. _MruGracz(playerid, string);
  6347. _MruGracz(playerid, "|________________________________________________________|");
  6348. return 0;
  6349. }//lets start
  6350. if(strcmp(x_nr,"1",true) == 0)
  6351. {
  6352. if(PlacedNews[playerid] == 1) { _MruGracz(playerid, "Ten numer jest zajęty, usuń wiadomość z tego numeru !"); return 0; }
  6353. if(PlayerInfo[playerid][pRank] < 3) { _MruGracz(playerid, "Musisz miec 3 rangę aby pisać newsy Hitman Agency !"); return 0; }
  6354. if(News[hTaken1] == 0)
  6355. {
  6356. GetPlayerName(playerid, sendername, sizeof(sendername));
  6357. if(strlen(text)-(strlen(x_nr)) < 9) { _MruGracz(playerid, "Za krótki tekst newsa !"); return 0; }
  6358. format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd1], string, 0, strlen(string));
  6359. format(string, sizeof(string), "%s",sendername); strmid(News[hContact1], string, 0, strlen(string));
  6360. News[hTaken1] = 1; PlacedNews[playerid] = 1;
  6361. _MruGracz(playerid, "* Umieściłeś news na kanale Hitman Agency.");
  6362. return 0;
  6363. }
  6364. else
  6365. {
  6366. _MruGracz(playerid, "Ten numer jest zajety !");
  6367. return 0;
  6368. }
  6369. }
  6370. else if(strcmp(x_nr,"2",true) == 0)
  6371. {
  6372. if(PlacedNews[playerid] == 1) { _MruGracz(playerid, "Ten numer jest zajęty, usuń wiadomość z tego numeru !"); return 0; }
  6373. if(PlayerInfo[playerid][pRank] < 3) { _MruGracz(playerid, "Musisz mieć 3 rangę aby pisać newsy na kanale Hitman Agency !"); return 0; }
  6374. if(News[hTaken2] == 0)
  6375. {
  6376. GetPlayerName(playerid, sendername, sizeof(sendername));
  6377. if(strlen(text)-(strlen(x_nr)) < 9) { _MruGracz(playerid, "News jest za krótki !"); return 0; }
  6378. format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd2], string, 0, strlen(string));
  6379. format(string, sizeof(string), "%s",sendername); strmid(News[hContact2], string, 0, strlen(string));
  6380. News[hTaken2] = 1; PlacedNews[playerid] = 1;
  6381. _MruGracz(playerid, "* Umieściłeś news na kanale Hitman Agency.");
  6382. return 0;
  6383. }
  6384. else
  6385. {
  6386. _MruGracz(playerid, "Ten numer jest aktualnie w użyciu !");
  6387. return 0;
  6388. }
  6389. }
  6390. else if(strcmp(x_nr,"3",true) == 0)
  6391. {
  6392. if(PlacedNews[playerid] == 1) { _MruGracz(playerid, "Ten numer jest zajęty, usuń wiadomość z tego numeru !"); return 0; }
  6393. if(PlayerInfo[playerid][pRank] < 3) { _MruGracz(playerid, "Musisz mieć 3 rangę aby pisać newsy na kanale Hitman Agency !"); return 0; }
  6394. if(News[hTaken3] == 0)
  6395. {
  6396. GetPlayerName(playerid, sendername, sizeof(sendername));
  6397. if(strlen(text)-(strlen(x_nr)) < 9) { _MruGracz(playerid, "News jest za krótki !"); return 0; }
  6398. format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd3], string, 0, strlen(string));
  6399. format(string, sizeof(string), "%s",sendername); strmid(News[hContact3], string, 0, strlen(string));
  6400. News[hTaken3] = 1; PlacedNews[playerid] = 1;
  6401. _MruGracz(playerid, "* Umieściłeś news na kanale Hitman Agency.");
  6402. return 0;
  6403. }
  6404. else
  6405. {
  6406. _MruGracz(playerid, "Ten numer jest aktualnie w użyciu !");
  6407. return 0;
  6408. }
  6409. }
  6410. else if(strcmp(x_nr,"4",true) == 0)
  6411. {
  6412. if(PlacedNews[playerid] == 1) { _MruGracz(playerid, "Ten numer jest zajęty, usuń wiadomość z tego numeru !"); return 0; }
  6413. if(PlayerInfo[playerid][pRank] < 3) { _MruGracz(playerid, "Musisz mieć 3 rangę aby pisać newsy na kanale Hitman Agency !"); return 0; }
  6414. if(News[hTaken4] == 0)
  6415. {
  6416. GetPlayerName(playerid, sendername, sizeof(sendername));
  6417. if(strlen(text)-(strlen(x_nr)) < 9) { _MruGracz(playerid, "News jest za krótki !"); return 0; }
  6418. format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd4], string, 0, strlen(string));
  6419. format(string, sizeof(string), "%s",sendername); strmid(News[hContact4], string, 0, strlen(string));
  6420. News[hTaken4] = 1; PlacedNews[playerid] = 1;
  6421. _MruGracz(playerid, "* Umieściłeś news na kanale Hitman Agency.");
  6422. return 0;
  6423. }
  6424. else
  6425. {
  6426. _MruGracz(playerid, "Ten numer jest aktualnie w użyciu !");
  6427. return 0;
  6428. }
  6429. }
  6430. else if(strcmp(x_nr,"5",true) == 0)
  6431. {
  6432. if(PlacedNews[playerid] == 1) { _MruGracz(playerid, "Ten numer jest zajęty, usuń wiadomość z tego numeru !"); return 0; }
  6433. if(PlayerInfo[playerid][pRank] < 3) { _MruGracz(playerid, "Musisz mieć 3 rangę aby pisać newsy na kanale Hitman Agency !"); return 0; }
  6434. if(News[hTaken5] == 0)
  6435. {
  6436. GetPlayerName(playerid, sendername, sizeof(sendername));
  6437. if(strlen(text)-(strlen(x_nr)) < 9) { _MruGracz(playerid, "News jest za krótki !"); return 0; }
  6438. format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd5], string, 0, strlen(string));
  6439. format(string, sizeof(string), "%s",sendername); strmid(News[hContact5], string, 0, strlen(string));
  6440. News[hTaken5] = 1; PlacedNews[playerid] = 1;
  6441. _MruGracz(playerid, "* Umieściłeś news na kanale Hitman Agency.");
  6442. return 0;
  6443. }
  6444. else
  6445. {
  6446. _MruGracz(playerid, "Ten numer jest aktualnie w użyciu !");
  6447. return 0;
  6448. }
  6449. }
  6450. else if(strcmp(x_nr,"delete",true) == 0)
  6451. {
  6452. if(PlayerInfo[playerid][pRank] < 4)
  6453. {
  6454. _MruGracz(playerid, "Musisz mieć 4 rangę aby usuwać newsy z kanału Hitman Agency !");
  6455. return 0;
  6456. }
  6457. new string1[MAX_PLAYER_NAME];
  6458. new x_tel[128];
  6459. x_tel = strtok(text, idx);
  6460. if(!strlen(x_tel)) {
  6461. _MruGracz(playerid, "UŻYJ: News delete [numer] lub News delete all.");
  6462. return 0;
  6463. }
  6464. if(strcmp(x_tel,"1",true) == 0)
  6465. {
  6466. format(string, sizeof(string), "Nothing"); strmid(News[hAdd1], string, 0, strlen(string));
  6467. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact1], string1, 0, strlen(string1));
  6468. News[hTaken1] = 0;
  6469. _MruGracz(playerid, "* Skasowałeś newsa numer (1) Z kanału Hitman Agency.");
  6470. return 0;
  6471. }
  6472. else if(strcmp(x_tel,"2",true) == 0)
  6473. {
  6474. format(string, sizeof(string), "Nothing"); strmid(News[hAdd2], string, 0, strlen(string));
  6475. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact2], string1, 0, strlen(string1));
  6476. News[hTaken2] = 0;
  6477. _MruGracz(playerid, "* Skasowałeś newsa numer (2) Z kanału Hitman Agency.");
  6478. return 0;
  6479. }
  6480. else if(strcmp(x_tel,"3",true) == 0)
  6481. {
  6482. format(string, sizeof(string), "Nothing"); strmid(News[hAdd3], string, 0, strlen(string));
  6483. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact3], string1, 0, strlen(string1));
  6484. News[hTaken3] = 0;
  6485. _MruGracz(playerid, "* Skasowałeś newsa numer (3) Z kanału Hitman Agency.");
  6486. return 0;
  6487. }
  6488. else if(strcmp(x_tel,"4",true) == 0)
  6489. {
  6490. format(string, sizeof(string), "Nothing"); strmid(News[hAdd4], string, 0, strlen(string));
  6491. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact4], string1, 0, strlen(string1));
  6492. News[hTaken4] = 0;
  6493. _MruGracz(playerid, "* Skasowałeś newsa numer (4) Z kanału Hitman Agency.");
  6494. return 0;
  6495. }
  6496. else if(strcmp(x_tel,"5",true) == 0)
  6497. {
  6498. format(string, sizeof(string), "Nothing"); strmid(News[hAdd5], string, 0, strlen(string));
  6499. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact5], string1, 0, strlen(string1));
  6500. News[hTaken5] = 0;
  6501. _MruGracz(playerid, "* Skasowałeś newsa numer (5) Z kanału Hitman Agency.");
  6502. return 0;
  6503. }
  6504. else if(strcmp(x_tel,"all",true) == 0)
  6505. {
  6506. format(string, sizeof(string), "Nothing"); strmid(News[hAdd1], string, 0, strlen(string));
  6507. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact1], string1, 0, strlen(string1));
  6508. News[hTaken1] = 0;
  6509. format(string, sizeof(string), "Nothing"); strmid(News[hAdd2], string, 0, strlen(string));
  6510. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact2], string1, 0, strlen(string1));
  6511. News[hTaken2] = 0;
  6512. format(string, sizeof(string), "Nothing"); strmid(News[hAdd3], string, 0, strlen(string));
  6513. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact3], string1, 0, strlen(string1));
  6514. News[hTaken3] = 0;
  6515. format(string, sizeof(string), "Nothing"); strmid(News[hAdd4], string, 0, strlen(string));
  6516. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact4], string1, 0, strlen(string1));
  6517. News[hTaken4] = 0;
  6518. format(string, sizeof(string), "Nothing"); strmid(News[hAdd5], string, 0, strlen(string));
  6519. format(string1, sizeof(string1), "Nikt"); strmid(News[hContact5], string1, 0, strlen(string1));
  6520. News[hTaken5] = 0;
  6521. _MruGracz(playerid, "* Skasowałeś wszystkie newsy z kanału Hitman Agency.");
  6522. return 0;
  6523. }
  6524. else
  6525. {
  6526. _MruGracz(playerid, "UŻYJ: News delete [numer] lub News delete all.");
  6527. return 0;
  6528. }
  6529. }
  6530. else { return 0; }
  6531. }
  6532. else if ((strcmp("Givehit", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Givehit")))
  6533. {
  6534. if(PlayerInfo[playerid][pRank] < 4)
  6535. {
  6536. _MruGracz(playerid, "Musisz mieć 4 rangę aby dawać kontrakty Hitmanom !");
  6537. return 0;
  6538. }
  6539. if(hitfound == 0)
  6540. {
  6541. _MruGracz(playerid, "Nie sprawdziłeś jeszcze kontraktów, zrób to w laptopie (wpisz 'kontrakty') !");
  6542. return 0;
  6543. }
  6544. tmp = strtok(text, idx);
  6545. if(!strlen(tmp))
  6546. {
  6547. _MruGracz(playerid, "UŻYJ: Givehit [playerid/CzęśćNicku]");
  6548. return 0;
  6549. }
  6550. //giveplayerid = strval(tmp);
  6551. giveplayerid = ReturnUser(tmp);
  6552. if(IsPlayerConnected(giveplayerid))
  6553. {
  6554. if(giveplayerid != INVALID_PLAYER_ID)
  6555. {
  6556. if(!IsAHA(giveplayerid))
  6557. {
  6558. _MruGracz(playerid, "Ten gracz nie jest Hitmanem !");
  6559. return 0;
  6560. }
  6561. if(GoChase[giveplayerid] < 999)
  6562. {
  6563. _MruGracz(playerid, "Ten Hitman wykonuje już jakieś zlecenie !");
  6564. return 0;
  6565. }
  6566. if(IsPlayerConnected(hitmanid))
  6567. {
  6568. GetPlayerName(playerid, sendername, sizeof(sendername));
  6569. GetPlayerName(giveplayerid, giver, sizeof(giver));
  6570. GetPlayerName(hitmanid, giveplayer, sizeof(giveplayer));
  6571.  
  6572. format(string, sizeof(string), "* Hitman %s, dał zlecenie %s na zabicie: %s(ID:%d), nagroda: $%d.", sendername, giver, giveplayer, hitmanid, PlayerInfo[hitmanid][pHeadValue]);
  6573. SendFamilyMessage(8, COLOR_YELLOW, string);
  6574. GoChase[giveplayerid] = hitmanid;
  6575. GetChased[hitmanid] = giveplayerid;
  6576. GotHit[hitmanid] = 1;
  6577. hitmanid = 0;
  6578. hitfound = 0;
  6579. return 0;
  6580. }
  6581. else
  6582. {
  6583. _MruGracz(playerid, "Osoby, na którą jest zlecenie, nie ma na serwerze. Spróbuj później !");
  6584. return 0;
  6585. }
  6586. }
  6587. return 0;
  6588. }
  6589. else
  6590. {
  6591. _MruGracz(playerid, "Tego gracza nie ma na serwerze lub nie jest Hitmanem !");
  6592. return 0;
  6593. }
  6594. }
  6595. else if ((strcmp("Ranks", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Ranks")) || (strcmp("Rangi", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Rangi")))
  6596. {
  6597. _MruGracz(playerid, "|__________________ Rangi Hitmanów __________________|");
  6598. foreach(Player, i)
  6599. {
  6600. if(IsPlayerConnected(i))
  6601. {
  6602. if(PlayerInfo[i][pMember] == 8||PlayerInfo[i][pLider] == 8)
  6603. {
  6604. GetPlayerName(i, giveplayer, sizeof(giveplayer));
  6605. format(string, sizeof(string), "* %s: Ranga %d", giveplayer,PlayerInfo[i][pRank]);
  6606. _MruGracz(playerid, string);
  6607. }
  6608. }
  6609. }
  6610. }
  6611. else if ((strcmp("Order", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Order")))
  6612. {
  6613. if(OrderReady[playerid] > 0)
  6614. {
  6615. _MruGracz(playerid, "Zamówiłeś już paczki z bronią, idź do swojej bazy aby je odebrać !");
  6616. return 0;
  6617. }
  6618. tmp = strtok(text, idx);
  6619. if ((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
  6620. {
  6621. //if(PlayerInfo[playerid][pRank] < 0) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6622. if(kaska[playerid] > 2499)
  6623. {
  6624. _MruGracz(playerid, "* Zamówiłeś paczkę numer 1 ($2500), zostanie dostarczona do drzwi Agencji.");
  6625. OrderReady[playerid] = 1;
  6626. return 0;
  6627. }
  6628. else
  6629. {
  6630. _MruGracz(playerid,"Nie stać cię na to !");
  6631. return 0;
  6632. }
  6633. }
  6634. else if ((strcmp("2", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("2")))
  6635. {
  6636. if(PlayerInfo[playerid][pRank] < 1) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6637. if(kaska[playerid] > 4999)
  6638. {
  6639. _MruGracz(playerid, "* Zamówiłeś paczkę numer 2 ($5000), zostanie dostarczona do drzwi Agencji.");
  6640. OrderReady[playerid] = 2;
  6641. return 0;
  6642. }
  6643. else
  6644. {
  6645. _MruGracz(playerid,"Nie stać cię na to !");
  6646. return 0;
  6647. }
  6648. }
  6649. else if ((strcmp("3", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("3")))
  6650. {
  6651. if(PlayerInfo[playerid][pRank] < 2) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6652. if(kaska[playerid] > 5999)
  6653. {
  6654. _MruGracz(playerid, "* Zamówiłeś paczke numer 3 ($6000), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6655. OrderReady[playerid] = 3;
  6656. return 0;
  6657. }
  6658. else
  6659. {
  6660. _MruGracz(playerid,"Nie stać cię na to !");
  6661. return 0;
  6662. }
  6663. }
  6664. else if ((strcmp("4", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("4")))
  6665. {
  6666. if(PlayerInfo[playerid][pRank] < 2) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6667. if(kaska[playerid] > 5999)
  6668. {
  6669. _MruGracz(playerid, "* Zamówiłeś paczke numer 4 ($6000), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6670. OrderReady[playerid] = 4;
  6671. return 0;
  6672. }
  6673. else
  6674. {
  6675. _MruGracz(playerid,"Nie stać cię na to !");
  6676. return 0;
  6677. }
  6678. }
  6679. else if ((strcmp("5", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("5")))
  6680. {
  6681. if(PlayerInfo[playerid][pRank] < 3) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6682. if(kaska[playerid] > 7999)
  6683. {
  6684. _MruGracz(playerid, "* Zamówiłeś paczke numer 5 ($8000), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6685. OrderReady[playerid] = 5;
  6686. return 0;
  6687. }
  6688. else
  6689. {
  6690. _MruGracz(playerid,"Nie stać cię na to !");
  6691. return 0;
  6692. }
  6693. }
  6694. else if ((strcmp("6", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("6")))
  6695. {
  6696. if(PlayerInfo[playerid][pRank] < 3) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6697. if(kaska[playerid] > 7999)
  6698. {
  6699. _MruGracz(playerid, "* Zamówiłeś paczke numer 6 ($8000), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6700. OrderReady[playerid] = 6;
  6701. return 0;
  6702. }
  6703. else
  6704. {
  6705. _MruGracz(playerid,"Nie stać cię na to !");
  6706. return 0;
  6707. }
  6708. }
  6709. else if ((strcmp("7", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("7")))
  6710. {
  6711. if(PlayerInfo[playerid][pRank] < 4) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6712. if(kaska[playerid] > 8499)
  6713. {
  6714. _MruGracz(playerid, "* Zamówiłeś paczke numer 7 ($8500), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6715. OrderReady[playerid] = 7;
  6716. return 0;
  6717. }
  6718. else
  6719. {
  6720. _MruGracz(playerid,"Nie stać cię na to !");
  6721. return 0;
  6722. }
  6723. }
  6724. else if ((strcmp("8", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("8")))
  6725. {
  6726. if(PlayerInfo[playerid][pRank] < 4) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6727. if(kaska[playerid] > 8499)
  6728. {
  6729. _MruGracz(playerid, "* Zamówiłeś paczke numer 8 ($8500), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6730. OrderReady[playerid] = 8;
  6731. return 0;
  6732. }
  6733. else
  6734. {
  6735. _MruGracz(playerid,"Nie stać cię na to !");
  6736. return 0;
  6737. }
  6738. }
  6739. else if ((strcmp("9", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("9")))
  6740. {
  6741. if(PlayerInfo[playerid][pRank] < 5) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6742. if(kaska[playerid] > 9999)
  6743. {
  6744. _MruGracz(playerid, "* Zamówiłeś paczke numer 9 ($10000), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6745. OrderReady[playerid] = 9;
  6746. return 0;
  6747. }
  6748. else
  6749. {
  6750. _MruGracz(playerid,"Nie stać cię na to !");
  6751. return 0;
  6752. }
  6753. }
  6754. else if ((strcmp("10", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("10")))
  6755. {
  6756. if(PlayerInfo[playerid][pRank] < 5) { _MruGracz(playerid, "Masz zbyt niską rangę aby zamówić tę paczke !"); return 0; }
  6757. if(kaska[playerid] > 9999)
  6758. {
  6759. _MruGracz(playerid, "* Zamówiłeś paczke numer 10 ($10000), Zostanie dostarczona do drzwi frontowych bazy Agencji.");
  6760. OrderReady[playerid] = 10;
  6761. return 0;
  6762. }
  6763. else
  6764. {
  6765. _MruGracz(playerid,"Nie stać cię na to !");
  6766. return 0;
  6767. }
  6768. }
  6769. else
  6770. {
  6771. _MruGracz(playerid, "|__________________ Dostępne paczki __________________|");
  6772. if(PlayerInfo[playerid][pRank] >= 0) { _MruGracz(playerid, "|(1) ($2500) Ranga 0: Nóż, Desert Eagle, Shotgun, Pancerz"); }
  6773. if(PlayerInfo[playerid][pRank] >= 1) { _MruGracz(playerid, "|(2) ($5000) Ranga 1: Nóż, Desert Eagle, MP5, Shotgun, Pancerz"); }
  6774. if(PlayerInfo[playerid][pRank] >= 2) { _MruGracz(playerid, "|(3) ($6000) Ranga 2: Nóż, Desert Eagle, M4, MP5, Shotgun, Pancerz"); }
  6775. if(PlayerInfo[playerid][pRank] >= 2) { _MruGracz(playerid, "|(4) ($6000) Ranga 2: Nóż, Desert Eagle, AK47, MP5, Shotgun, Pancerz"); }
  6776. if(PlayerInfo[playerid][pRank] >= 3) { _MruGracz(playerid, "|(5) ($8000) Ranga 3: Nóż, Desert Eagle, M4, MP5, Shotgun, Snajperka, Pancerz"); }
  6777. if(PlayerInfo[playerid][pRank] >= 3) { _MruGracz(playerid, "|(6) ($8000) Ranga 3: Nóż, Desert Eagle, AK47, MP5, Shotgun, Snajperka, Pancerz"); }
  6778. if(PlayerInfo[playerid][pRank] >= 4) { _MruGracz(playerid, "|(7) ($8500) Ranga 4: Nóż, Desert Eagle, M4, MP5, Spas12, Snajperka, Pancerz"); }
  6779. if(PlayerInfo[playerid][pRank] >= 4) { _MruGracz(playerid, "|(8) ($8500) Ranga 4: Nóż, Desert Eagle, AK47, MP5, Spas12, Snajperka, Pancerz"); }
  6780. if(PlayerInfo[playerid][pRank] >= 5) { _MruGracz(playerid, "|(9) ($10000) Ranga 5-9: Nóż, Desert Eagle, M4, UZI, Spas12, Snajperka, Pancerz"); }
  6781. if(PlayerInfo[playerid][pRank] >= 5) { _MruGracz(playerid, "|(10) ($10000) Ranga 5-9: Nóż, Desert Eagle, AK47, UZI, Spas12, Snajperka, Pancerz"); }
  6782. _MruGracz(playerid, "|________________________________________________________|");
  6783. return 0;
  6784. }
  6785. }
  6786. else if ((strcmp("Logout", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Logout")) || (strcmp("Wyloguj", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Wyloguj")))
  6787. {
  6788. _MruGracz(playerid, "* Wyłączyłeś swój laptop i zerwałeś połączenie z agencją.");
  6789. ConnectedToPC[playerid] = 0;
  6790. return 0;
  6791. }
  6792. else
  6793. {
  6794. _MruGracz(playerid, "|___ Hitman Agency ___|");
  6795. _MruGracz(playerid, "| - News");
  6796. _MruGracz(playerid, "| - Kontrakty");
  6797. _MruGracz(playerid, "| - Givehit");
  6798. _MruGracz(playerid, "| - Backup");
  6799. _MruGracz(playerid, "| - Order");
  6800. _MruGracz(playerid, "| - Rangi");
  6801. _MruGracz(playerid, "| - Wyloguj");
  6802. _MruGracz(playerid, "|");
  6803. _MruGracz(playerid, "|______________|00:00|");
  6804. return 0;
  6805. }
  6806. return 0;
  6807. }
  6808. if(CallLawyer[playerid] == 111)
  6809. {
  6810. new idx;
  6811. tmp = strtok(text, idx);
  6812. if ((strcmp("tak", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("tak")))
  6813. {
  6814. GetPlayerName(playerid, sendername, sizeof(sendername));
  6815. format(string, sizeof(string), "** %s jest w więzieniu i potrzebuje prawnika, jedź na komisariat.", sendername);
  6816. SendJobMessage(2, TEAM_AZTECAS_COLOR, string);
  6817. SendJobMessage(2, TEAM_AZTECAS_COLOR, "* Kiedy będziesz juz na komisariacie, spytaj się policjanta o /akceptuj prawnik.");
  6818. _MruGracz(playerid, "Jeśli policjant się zgodzi, prawnik będzie mógł uwolnić cię za opłatą.");
  6819. WantLawyer[playerid] = 0;
  6820. CallLawyer[playerid] = 0;
  6821. return 0;
  6822. }
  6823. else
  6824. {
  6825. _MruGracz(playerid, "Nie ma żadnych prawników na serwerze, czas odsiadki rozpoczęty.");
  6826. WantLawyer[playerid] = 0;
  6827. CallLawyer[playerid] = 0;
  6828. return 0;
  6829. }
  6830. }
  6831. if(TalkingLive[playerid] != INVALID_PLAYER_ID)
  6832. {
  6833. GetPlayerName(playerid, sendername, sizeof(sendername));
  6834. if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLider] == 9)
  6835. {
  6836. format(string, sizeof(string), "Reporter %s: %s", sendername, text);
  6837. OOCNews(COLOR_LIGHTGREEN, string);
  6838. }
  6839. else
  6840. {
  6841. format(string, sizeof(string), "Gość wywiadu %s: %s", sendername, text);
  6842. OOCNews(COLOR_LIGHTGREEN, string);
  6843. }
  6844. return 0;
  6845. }
  6846. if(Mobile[playerid] != 1255)
  6847. {
  6848. new idx;
  6849. tmp = strtok(text, idx);
  6850. GetPlayerName(playerid, sendername, sizeof(sendername));
  6851. format(string, sizeof(string), "%s mówi (telefon): %s", sendername, text);
  6852. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  6853.  
  6854. if(Mobile[playerid] == 914)
  6855. {
  6856. if(!strlen(tmp))
  6857. {
  6858. _MruGracz(playerid, "Centrala: Niestety, nie rozumiem");
  6859. return 0;
  6860. }
  6861. new turner[MAX_PLAYER_NAME];
  6862. new wanted[128];
  6863. GetPlayerName(playerid, turner, sizeof(turner));
  6864. _MruGracz(playerid, "Centrala: Zgłosimy to wszystkim jednostkom w danym obszarze.");
  6865. _MruGracz(playerid, "Dziękujemy za zgłoszenie");
  6866. format(wanted, sizeof(wanted), "Centrala: Do wszystkich jednostek: Nadawca: %s",turner);
  6867. SendTeamMessage(4, COLOR_ALLDEPT, wanted);
  6868. format(wanted, sizeof(wanted), "Dyspozytor: Zgłoszono: %s",text);
  6869. SendTeamMessage(4, COLOR_ALLDEPT, wanted);
  6870. _MruGracz(playerid, "Rozmowa zakończona...");
  6871. Mobile[playerid] = 1255;
  6872. return 0;
  6873. }
  6874. if(Mobile[playerid] == 916)
  6875. {
  6876. if(!strlen(tmp))
  6877. {
  6878. _MruGracz(playerid, "Centrala: Niestety, nie rozumiem");
  6879. return 0;
  6880. }
  6881. new turner[MAX_PLAYER_NAME];
  6882. new wanted[128];
  6883. GetPlayerName(playerid, turner, sizeof(turner));
  6884. _MruGracz(playerid, "Centrala: Zgłosimy to wszystkim jednostkom w danym obszarze.");
  6885. _MruGracz(playerid, "Dziękujemy za zgłoszenie");
  6886. format(wanted, sizeof(wanted), "Centrala: Do wszystkich jednostek: Nadawca: %s",turner);
  6887. SendTeamMessage(17, COLOR_ALLDEPT, wanted);
  6888. format(wanted, sizeof(wanted), "Dyspozytor: Zgłoszono: %s",text);
  6889. SendTeamMessage(17, COLOR_ALLDEPT, wanted);
  6890. _MruGracz(playerid, "Rozmowa zakończona...");
  6891. Mobile[playerid] = 1255;
  6892. return 0;
  6893. }
  6894. if(Mobile[playerid] == 913)
  6895. {
  6896. if(!strlen(tmp))
  6897. {
  6898. _MruGracz(playerid, "Centrala: Niestety, nie rozumiem");
  6899. return 0;
  6900. }
  6901. else {
  6902. new turner[MAX_PLAYER_NAME];
  6903. new wanted[128];
  6904. GetPlayerName(playerid, turner, sizeof(turner));
  6905. _MruGracz(playerid, "Centrala: Ostrzeżemy wszystkie jednostki w danym obszarze.");
  6906. _MruGracz(playerid, "Dziękujemy za zgłoszenie przestępstwa");
  6907. format(wanted, sizeof(wanted), "HQ: Do Wszystkich Jednostek: Nadawca: %s",turner);
  6908. SendFamilyMessage(1, COLOR_DBLUE, wanted);
  6909. format(wanted, sizeof(wanted), "HQ: Przestepstwo: %s, Poszukiwany: Nieznany",PlayerCrime[playerid][pAccusing]);
  6910. SendFamilyMessage(1, COLOR_DBLUE, wanted);
  6911. _MruGracz(playerid, "Rozmowa zakończona...");
  6912. Mobile[playerid] = 1255;
  6913. return 0;
  6914. }
  6915. }
  6916. if(Mobile[playerid] == 912)
  6917. {
  6918. if(!strlen(tmp))
  6919. {
  6920. _MruGracz(playerid, "Centrala: Niestety, nie rozumiem");
  6921. return 0;
  6922. } else if(strlen(text) > 82) {
  6923. Mobile[playerid] = 912;
  6924. _MruGracz(playerid, "Centrala: Niestety, nie rozumiem. Proszę powtórzyć ((max 75 znaków))");
  6925. return 0;
  6926. }
  6927. mysql_real_escape_string(text, text);
  6928. //strmid(PlayerCrime[playerid][pAccusing], text, 0, strlen(text), 255);
  6929. new id = getWolneZgloszenie();
  6930. new Hour, Minute;
  6931. gettime(Hour, Minute);
  6932. new datapowod[160];
  6933. format(datapowod, sizeof(datapowod), "%02d:%02d", Hour, Minute);
  6934. new pZone[MAX_ZONE_NAME];
  6935. GetPlayer2DZone(giveplayerid, pZone, MAX_ZONE_NAME);
  6936. strmid(Zgloszenie[id][zgloszenie_kiedy], datapowod, 0, sizeof(datapowod), 36);
  6937. format(Zgloszenie[id][zgloszenie_nadal], MAX_PLAYER_NAME, "%s", GetNick(playerid, true));
  6938. format(Zgloszenie[id][zgloszenie_lokacja], MAX_ZONE_NAME, "%s", pZone);
  6939. strmid(Zgloszenie[id][zgloszenie_tresc], text, 0, strlen(text) + 9, 128);
  6940. Zgloszenie[id][zgloszenie_status] = 0;
  6941. SendFamilyMessage(1, COLOR_DBLUE, "HQ: Do Wszystkich Jednostek: Otrzymano nowe zgłoszenie!");
  6942. sendTipMessageEx(playerid, COLOR_GRAD2, "[Telefon] Rozmowa zakończona");
  6943. Mobile[playerid] = 1255;
  6944. return 0;
  6945. }
  6946. if(Mobile[playerid] == 928)
  6947. {
  6948. if(!strlen(tmp))
  6949. {
  6950. _MruGracz(playerid, "Centrala: Niestety, nie rozumiem");
  6951. return 0;
  6952. } else if(strlen(text) > 82) {
  6953. Mobile[playerid] = 928;
  6954. _MruGracz(playerid, "Centrala: Niestety, nie rozumiem. Proszę powtórzyć ((max 75 znaków))");
  6955. return 0;
  6956. }
  6957. //strmid(PlayerCrime[playerid][pAccusing], text, 0, strlen(text), 255);
  6958. new id = getWolneZgloszenieSasp();
  6959. mysql_real_escape_string(text, text);
  6960. new Hour, Minute;
  6961. gettime(Hour, Minute);
  6962. new datapowod[160];
  6963. format(datapowod, sizeof(datapowod), "%02d:%02d", Hour, Minute);
  6964. new pZone[MAX_ZONE_NAME];
  6965. GetPlayer2DZone(giveplayerid, pZone, MAX_ZONE_NAME);
  6966. strmid(ZgloszenieSasp[id][zgloszenie_kiedy], datapowod, 0, sizeof(datapowod), 36);
  6967. format(ZgloszenieSasp[id][zgloszenie_nadal], MAX_PLAYER_NAME, "%s", GetNick(playerid, true));
  6968. format(ZgloszenieSasp[id][zgloszenie_lokacja], MAX_ZONE_NAME, "%s", pZone);
  6969. strmid(ZgloszenieSasp[id][zgloszenie_tresc], text, 0, strlen(text) + 9, 128);
  6970. ZgloszenieSasp[id][zgloszenie_status] = 0;
  6971. SendFamilyMessage(3, COLOR_DBLUE, "HQ: Do Wszystkich Jednostek: Otrzymano nowe zgłoszenie!");
  6972. sendTipMessageEx(playerid, COLOR_GRAD2, "[Telefon] Rozmowa zakończona");
  6973. Mobile[playerid] = 1255;
  6974. return 0;
  6975. }
  6976.  
  6977. if(IsPlayerConnected(Mobile[playerid]))
  6978. {
  6979. if(Mobile[Mobile[playerid]] == playerid)
  6980. {
  6981. SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
  6982. }
  6983. }
  6984. else
  6985. {
  6986. _MruGracz(playerid,"Nikt się nie odzywa");
  6987. }
  6988. return 0;
  6989. }
  6990. if (realchat)
  6991. {
  6992. if(gPlayerLogged[playerid] == 0)
  6993. {
  6994. return 0;
  6995. }
  6996. /*if(GetPlayerState(playerid) == 2 || GetPlayerState(playerid) == 3)
  6997. {
  6998. GetPlayerName(playerid, sendername, sizeof(sendername));
  6999. format(string, sizeof(string), "%s mówi (w pojeździe): %s", sendername, text);
  7000. ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  7001. SetPlayerChatBubble(playerid,text,COLOR_FADE1,10.0,8000);
  7002. }
  7003. else
  7004. {
  7005. GetPlayerName(playerid, sendername, sizeof(sendername));
  7006. format(string, sizeof(string), "%s mówi: %s", sendername, text);
  7007. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  7008. SetPlayerChatBubble(playerid,text,COLOR_FADE1,20.0,8000);
  7009. ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,4,4);
  7010. } */
  7011. if(strlen(text) < 78)
  7012. {
  7013. format(string, sizeof(string), "%s mówi: %s", GetNick(playerid, true), text);
  7014. ProxDetector(10.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
  7015. SetPlayerChatBubble(playerid,text,COLOR_FADE1,10.0,8000);
  7016. }
  7017. else
  7018. {
  7019. new pos = strfind(text, " ", true, strlen(text) / 2);
  7020. if(pos != -1)
  7021. {
  7022. new text2[64];
  7023.  
  7024. strmid(text2, text, pos + 1, strlen(text));
  7025. strdel(text, pos, strlen(text));
  7026.  
  7027. format(string, sizeof(string), "%s mówi: %s [.]", GetNick(playerid, true), text);
  7028. ProxDetector(13.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
  7029.  
  7030. format(string, sizeof(string), "[.] %s", text2);
  7031. ProxDetector(13.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
  7032. }
  7033. }
  7034. return 0;
  7035. }
  7036. #if DEBUG == 1
  7037. printf("%s[%d] OnPlayerText - end", GetNick(playerid), playerid);
  7038. #endif
  7039. return 1;
  7040. }//OnPlayerText
  7041.  
  7042. IBIZA_Reszta()
  7043. {
  7044. IbizaDrinkiPobierz();
  7045. mysql_query("SELECT `hajs` FROM `ibiza` WHERE `id`=2");
  7046. mysql_store_result();
  7047. if(mysql_num_rows())
  7048. {
  7049. new bufor[64];
  7050. mysql_fetch_row_format(bufor, "|");
  7051. sscanf(bufor, "d", IbizaBilet);
  7052. }
  7053. mysql_free_result();
  7054. //TEXTDRAWY
  7055.  
  7056. TDIbiza[0] = TextDrawCreate(390.00000, 21.500000, "01/01/1999 21:21");
  7057. TextDrawFont(TDIbiza[0], 2);
  7058. TextDrawLetterSize(TDIbiza[0], 0.599999, 2.000000);
  7059. TextDrawColor(TDIbiza[0], 0xFFFFFFFF);
  7060. TextDrawSetOutline(TDIbiza[0], 1);
  7061.  
  7062. TDIbiza[1] = TextDrawCreate(326.000000, 373.000000, "LD_BEAT:right");
  7063. TextDrawFont(TDIbiza[1], 4);
  7064. TextDrawTextSize(TDIbiza[1], 40.00, 40.00);
  7065. TextDrawSetSelectable(TDIbiza[1], 1);
  7066.  
  7067. TDIbiza[2] = TextDrawCreate(261.500000, 373.000000, "LD_BEAT:left");
  7068. TextDrawFont(TDIbiza[2], 4);
  7069. TextDrawTextSize(TDIbiza[2], 40.00, 40.00);
  7070. TextDrawSetSelectable(TDIbiza[2], 1);
  7071.  
  7072. //OBIEKTY INTEK IBIZA
  7073. IbizaKafle[0] = CreateDynamicObject(19128,1936.5900000,-2482.1700000,12.5084,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 473
  7074. IbizaKafle[1] = CreateDynamicObject(19128,1953.6400000,-2482.1300000,12.5084,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 474
  7075. IbizaKafle[2] = CreateDynamicObject(19128,1953.6500000,-2497.4700000,12.5084,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 475
  7076. IbizaKafle[3] = CreateDynamicObject(19128,1936.6100000,-2497.4700000,12.5084,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 476
  7077. IbizaRuryObiekty[0] = CreateDynamicObject(3503,1936.6000, -2482.1799, 11.0000,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 477
  7078. IbizaRuryObiekty[1] = CreateDynamicObject(3503,1953.6300, -2482.1299, 11.0000,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 478
  7079. IbizaRuryObiekty[2] = CreateDynamicObject(3503,1936.5900, -2497.4700, 11.0000,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 479
  7080. IbizaRuryObiekty[3] = CreateDynamicObject(3503,1953.6500, -2497.4600, 11.0000,0.0000000,0.0000000,0.0000000, 1, 0, -1); //Object number 480
  7081. IbizaBarierkiObiekty[0] = CreateDynamicObject(2773,1953.8400000,-2470.7100000,14.9000000,0.0000000,0.0000000,93.1800000, 1, 0, -1); //Object number 423
  7082. IbizaBarierkiObiekty[1] = CreateDynamicObject(2773,1951.9300000,-2470.8200000,14.9000000,0.0000000,0.0000000,93.1800000, 1, 0, -1); //Object number 424
  7083. IbizaBarierkiObiekty[2] = CreateDynamicObject(2773,1950.0100000,-2470.8700000,14.9000000,0.0000000,0.0000000,89.7000000, 1, 0, -1); //Object number 425
  7084. IbizaPiasek[0] = CreateDynamicObject(19377,1939.8800000,-2485.0000000,12.5500000,0.0000000,90.0000000,0.0000000, 1, 0, -1);
  7085. IbizaPiasek[1] = CreateDynamicObject(19377,1950.3800000,-2485.0000000,12.5500000,0.0000000,90.0000000,0.0000000, 1, 0, -1);
  7086. IbizaPiasek[2] = CreateDynamicObject(19377,1939.8800000,-2494.6300000,12.5500000,0.0000000,90.0000000,0.0000000, 1, 0, -1);
  7087. IbizaPiasek[3] = CreateDynamicObject(19377,1950.3800000,-2494.6300000,12.5500000,0.0000000,90.0000000,0.0000000, 1, 0, -1);
  7088. IbizaKameryObiekty[0] = CreateDynamicObject(1616,1958.9700000,-2477.3400000,21.7100000,0.0000000,0.0000000,90.7200000, 1, 0, -1); //przy scenie, paczy na VIP
  7089. IbizaKameryObiekty[1] = CreateDynamicObject(1616,1921.0300000,-2503.7500000,22.6100000,0.0000000,0.0000000,-97.3800000, 1, 0, -1); //nad VIPEm, paczy na parkiet
  7090. IbizaKameryObiekty[2] = CreateDynamicObject(1616,1892.9300000,-2473.6900000,21.7100000,0.0000000,0.0000000,-197.8200000, 1, 0, -1); //paczy na wejscie i bar, po lewo od prezesa
  7091. IbizaKameryObiekty[3] = CreateDynamicObject(1616,1892.9700000,-2493.0300000,20.7300000,0.0000000,0.0000000,-114.3000000, 1, 0, -1); //nad wejściem paczy na prezesa
  7092. IbizaKameryObiekty[4] = CreateDynamicObject(1616,1913.9400000,-2474.1600000,21.3700000,0.0000000,0.0000000,73.5000000, 1, 0, -1); //przy prezesie prawo
  7093. IbizaKameryObiekty[5] = CreateDynamicObject(1616,1757.2200000,-2467.5000000,24.0100000,-15.7800000,-14.4000000,40.1400000, 1, 0, -1); //przedsionek
  7094. IbizaKameryObiekty[6] = CreateDynamicObject(1616,1533.5800000,-2558.0900000,19.00000,0.0000000,0.0000000,-118.6800000, 1, 0, -1); //kibel
  7095. IbizaKameryObiekty[7] = CreateDynamicObject(1616,1533.5800000,-2558.0900000,19.00000,0.0000000,0.0000000,-118.6800000, 2, 0, -1); //kibel
  7096. IbizaKanciapaObiekt = CreateDynamicObject(19302, 1902.58, -2465.68, 19.12, 0.00, 0.00, 90.00, 1, 0, -1);
  7097.  
  7098. //IBIZA OBIEKTY NA ZEWNĄTRZ
  7099. IbizaKameryObiekty[8] = CreateDynamicObject(1616,386.9000000,-1808.9100000,12.9700000,0.0000000,0.0000000,20.0400000,0, 0, -1); //przy bramie
  7100. IbizaKameryObiekty[9] = CreateDynamicObject(1616,389.5400000,-1805.8600000,12.9800000,0.0000000,0.0000000,-114.0600000,0, 0, -1); //nad wejściem
  7101. IbizaKameryObiekty[10] = CreateDynamicObject(1616,436.0300000,-1787.4700000,19.5600000,0.0000000,0.0000000,48.3000000,0, 0, -1); //palma bliższa na wejście
  7102. IbizaKameryObiekty[11] = CreateDynamicObject(1616,308.5300000,-1816.9700000,10.0100000,0.0000000,0.0000000,-122.2800000,0, 0, -1); //z parkingu
  7103. IbizaBramaObiekty[0] = CreateDynamicObject(2372,420.9000000,-1783.4000000,4.3100000,0.0000000,0.0000000,0.0000000,0, 0, -1);
  7104. IbizaBramaObiekty[1] = CreateDynamicObject(2372,358.4000000,-1783.9000000,4.2000000,0.0000000,0.0000000,0.0000000,0, 0, -1);
  7105. }
  7106.  
  7107. stock IBIZA_end()
  7108. {
  7109. IbizaDrinkiZapisz();
  7110. }
  7111.  
  7112. public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  7113. {
  7114. #if DEBUG == 1
  7115. printf("%s[%d] OnPlayerSelectDynamicObject - begin", GetNick(playerid), playerid);
  7116. #endif
  7117. if(GetPVarInt(playerid, "Allow-edit"))
  7118. {
  7119. EditDynamicObject(playerid, objectid);
  7120. new lStr[32];
  7121. format(lStr, 32, "OBJID: %d", objectid);
  7122. _MruGracz(playerid-1, lStr);
  7123. }
  7124. #if DEBUG == 1
  7125. printf("%s[%d] OnPlayerSelectDynamicObject - end", GetNick(playerid), playerid);
  7126. #endif
  7127. return 1;
  7128. }
  7129.  
  7130. public OnPlayerEnterGangZone(playerid, zoneid)
  7131. {
  7132. if(ZONE_DISABLED == 0) {
  7133. new frac=GetPlayerFraction(playerid), org = GetPlayerOrg(playerid);
  7134. if(FRAC_GROOVE <= frac <= FRAC_VAGOS || frac == FRAC_WPS || GetPlayerOrgType(playerid) == ORG_TYPE_GANG)
  7135. {
  7136. ZoneTXD_Show(playerid, zoneid);
  7137. if(ZonePlayerTimer[playerid] == 0) ZonePlayerTimer[playerid] = SetTimerEx("Zone_HideInfo", 30000, 0, "i", playerid);
  7138. }
  7139. //Attack sync
  7140. if(ZoneAttack[zoneid] && PlayerInfo[playerid][pBW] == 0)
  7141. {
  7142. if(frac == ZoneAttackData[zoneid][2] || org == ZoneAttackData[zoneid][2]) // attacker
  7143. {
  7144. if(!ZoneAttacker[playerid])
  7145. {
  7146. ZoneAttacker[playerid] = true;
  7147. ZoneAttackData[zoneid][0]++;
  7148. }
  7149. }
  7150. else if(frac == ZoneAttackData[zoneid][3] || org == ZoneAttackData[zoneid][3]) // defender
  7151. {
  7152. if(!ZoneDefender[playerid])
  7153. {
  7154. ZoneDefender[playerid] = true;
  7155. ZoneAttackData[zoneid][1]++;
  7156. }
  7157. }
  7158. }
  7159. }
  7160. }
  7161.  
  7162. public OnPlayerLeaveGangZone(playerid, zoneid)
  7163. {
  7164. #if DEBUG == 1
  7165. printf("%s[%d] OnPlayerLeaveGangZone - begin", GetNick(playerid), playerid);
  7166. #endif
  7167. if(zoneid < 0)
  7168. {
  7169. printf("Invalid zoneid (%d) for player %d", zoneid, playerid);
  7170. return;
  7171. }
  7172. if(ZonePlayerTimer[playerid] != 0)
  7173. {
  7174. ZoneTXD_Hide(playerid);
  7175. KillTimer(ZonePlayerTimer[playerid]);
  7176. ZonePlayerTimer[playerid] = 0;
  7177. }
  7178. //Attack sync
  7179. if(ZoneAttack[zoneid])
  7180. {
  7181. if(GetPlayerFraction(playerid) == ZoneAttackData[zoneid][2] || GetPlayerOrg(playerid) == ZoneAttackData[zoneid][2]) // attacker
  7182. {
  7183. if(ZoneAttacker[playerid])
  7184. {
  7185. ZoneAttacker[playerid] = false;
  7186. ZoneAttackData[zoneid][0]--;
  7187. }
  7188. }
  7189. else if(GetPlayerFraction(playerid) == ZoneAttackData[zoneid][3] || GetPlayerOrg(playerid) == ZoneAttackData[zoneid][3]) // defender
  7190. {
  7191. if(ZoneDefender[playerid])
  7192. {
  7193. ZoneDefender[playerid] = false;
  7194. ZoneAttackData[zoneid][1]--;
  7195. }
  7196. }
  7197. }
  7198. SetPVarInt(playerid, "zoneid", -1);
  7199. #if DEBUG == 1
  7200. printf("%s[%d] OnPlayerLeaveGangZone - end", GetNick(playerid), playerid);
  7201. #endif
  7202. }
  7203.  
  7204. stock SetPlayerPosEx(playerid,Float:X,Float:Y,Float:Z)
  7205. {
  7206. SetPlayerPos(playerid,X,Y,Z);
  7207. }
  7208.  
  7209. stock PutPlayerInVehicleEx(playerid,vehicleid,seatid)
  7210. {
  7211. PutPlayerInVehicle(playerid,vehicleid,seatid);
  7212. }
  7213.  
  7214. stock RemovePlayerFromVehicleEx(playerid)
  7215. {
  7216. new veh = GetPlayerVehicleID(playerid);
  7217. new model = GetVehicleModel(veh);
  7218. if(model == 538 || model == 537 || model == 449)
  7219. {
  7220. new Float:x, Float:y, Float:z;
  7221. GetPlayerPos(playerid, x, y, z);
  7222. SetPlayerPosEx(playerid, x, y, z+0.7);
  7223. }
  7224. RemovePlayerFromVehicle(playerid);
  7225. }
  7226.  
  7227.  
  7228. public OnTrailerUpdate(playerid, vehicleid)
  7229. {
  7230. return 1;
  7231. }
  7232.  
  7233. public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  7234. {
  7235. return 1;
  7236. }
  7237.  
  7238. public MRP_ChangeVehicleColor(vehicleid, color1, color2)
  7239. {
  7240. new bool:save=false;
  7241. if(CarData[VehicleUID[vehicleid][vUID]][c_Color][0] != color1 || CarData[VehicleUID[vehicleid][vUID]][c_Color][1] != color2)
  7242. save = true;
  7243. if(color1 != -1)
  7244. CarData[VehicleUID[vehicleid][vUID]][c_Color][0] = color1;
  7245. if(color2 != -1)
  7246. CarData[VehicleUID[vehicleid][vUID]][c_Color][1] = color2;
  7247. if(save)
  7248. Car_Save(VehicleUID[vehicleid][vUID], CAR_SAVE_TUNE);
  7249. return 1;
  7250. }
  7251.  
  7252. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  7253. {
  7254. return 1;
  7255. }
  7256.  
  7257. public OnDynamicObjectMoved(objectid)
  7258. {
  7259. #if DEBUG == 1
  7260. printf("%d OnDynamicObjectMoved - begin", objectid);
  7261. #endif
  7262. if(ScenaCreated)
  7263. {
  7264. if(objectid == ScenaScreenObject)
  7265. {
  7266. Scena_ScreenEffect();
  7267. return 1;
  7268. }
  7269. for(new i=0;i<2;i++)
  7270. {
  7271. if(objectid == ScenaNeonData[SCNeonObj][i])
  7272. {
  7273. if(ScenaNeonData[SCNeonTyp] == 2)
  7274. {
  7275. ScenaNeonData[SCNeonZderzacz]++;
  7276. if(ScenaNeonData[SCNeonZderzacz] == 2) Scena_NeonEffect();
  7277. }
  7278. else Scena_NeonEffect();
  7279. return 1;
  7280. }
  7281. }
  7282. }
  7283. #if DEBUG == 1
  7284. printf("%d OnDynamicObjectMoved - end", objectid);
  7285. #endif
  7286. return 1;
  7287. }
  7288.  
  7289. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  7290. {
  7291. #if DEBUG == 1
  7292. printf("%s[%d] OnVehicleRespray - begin", GetNick(playerid), playerid);
  7293. #endif
  7294. if(CarData[VehicleUID[vehicleid][vUID]][c_Color][0] != color1)
  7295. {
  7296. ChangeVehicleColor(vehicleid, CarData[VehicleUID[vehicleid][vUID]][c_Color][0], CarData[VehicleUID[vehicleid][vUID]][c_Color][1]);
  7297. return 0;
  7298. }
  7299. if(CarData[VehicleUID[vehicleid][vUID]][c_Color][1] != color2)
  7300. {
  7301. ChangeVehicleColor(vehicleid, CarData[VehicleUID[vehicleid][vUID]][c_Color][0], CarData[VehicleUID[vehicleid][vUID]][c_Color][1]);
  7302. return 0;
  7303. }
  7304. #if DEBUG == 1
  7305. printf("%s[%d] OnVehicleRespray - end", GetNick(playerid), playerid);
  7306. #endif
  7307. return 1;
  7308. }
  7309.  
  7310. public OnPlayerStreamIn(playerid, forplayerid)
  7311. {
  7312. if(GetPVarInt(forplayerid, "tognick") == 1)
  7313. ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
  7314.  
  7315. return 1;
  7316. }
  7317.  
  7318. WasteDeAMXersTime()
  7319. {
  7320. new b;
  7321. #emit load.pri b
  7322. #emit stor.pri b
  7323. }
  7324.  
  7325. //Koniec.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement