Guest User

Untitled

a guest
Jul 18th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.54 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define LICZBA_CH 4
  4. #define LICZBA_RC 2
  5. #define LICZBA_WG 4
  6. #define LICZBA_CTF 4
  7. #define LICZBA_LB 4
  8. #define LICZBA_ST 4
  9. #define LICZBA_DB 2
  10. #define LICZBA_SS 2
  11. #define LICZBA_SN 2
  12. #define LICZBA_PB 2
  13. #define LICZBA_TR 2
  14. #define LICZBA_HAY 2
  15. #define LICZBA_SM 2
  16. #define LICZBA_CW 2
  17. #define LICZBA_US 2
  18. #define MAX_RACE_CHECK 50
  19. #define MAX_GRACZY 180
  20.  
  21. //////////////////////////////////////Kolory//////////////////////////////////////////
  22. #define C_ZIELONY "{00A600}"
  23. #define Zielony 0x3C9605FF
  24. #define zielony "{69E91D}"
  25. #define C_INFO 0xEAB171FF
  26. #define C_TD 0x006dd6FF
  27. #define POL_ZOLTY 0xF5DC0BFF
  28. #define POL_NIEBIESKI 0x209CF2FF
  29. #define COLOR_LIGHTYELLOW 0xFAEAA9FF
  30. #define COLOR_LIGHTORANGE 0xF7A26FFF
  31. #define COLOR_VIOLET 0x9955DEEE
  32. #define COLOR_LIGHTRED 0xFF99AADD
  33. #define COLOR_SEAGREEN
  34. #define COLOR_BROWN 0x8F4747FF
  35. #define C_RED2 0x8F4747FF
  36. #define COLOR_KREM 0xFF8080FF
  37. #define COLOR_GRAYWHITE 0xEEEEFFC4
  38. #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
  39. #define COLOR_GREENISHGOLD 0xDEAD4370
  40. #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
  41. #define COLOR_NEUTRALBLUE 0xABCDEF01
  42. #define COLOR_LIGHTCYAN 0xAAFFCC33
  43. #define COLOR_LEMON 0xDDDD2357
  44. #define COLOR_MEDIUMBLUE 0x63AFF00A
  45. #define COLOR_LIGHT_ORANGE 0xFF9900AA
  46. #define COLOR_NEUTRAL 0xABCDEF97
  47. #define COLOR_BLACK 0x00000000
  48. #define COLOR_NEUTRALGREEN 0x81CFAB00
  49. #define COLOR_DARKGREEN 0x12900BBF
  50. #define COLOR_LIGHTGREEN 0x24FF0AB9
  51. #define COLOR_DARKBLUE 0x300FFAAB
  52. #define COLOR_BLUEGREEN 0x46BBAA00
  53. #define COLOR_PINK 0xFF66FFAA
  54. #define COLOR_BLUE 0x0000BBAA
  55. #define COLOR_LIGHTBLUE 0x33CCFFAA
  56. #define COLOR_GRAD1 0xB4B5B7FF
  57. #define COLOR_DARKRED 0x660000AA
  58. #define COLOR_ORANGE 0xFF9900AA
  59. #define COLOR_GREY 0xAFAFAFAA
  60. #define COLOR_GREEN 0x33AA33AA
  61. #define COLOR_RED 0xAA3333AA
  62. #define COLOR_YELLOW 0xFFFF00AA
  63. #define COLOR_WHITE 0xFFFFFFAA
  64. #define COLOR_ADMIN 0xFF0000AA
  65. #define COLOR_KOMENDA 0xC83322FF
  66. #define COLOR_BLOOD 0xE60005FF
  67. #define COLOR_BGREEN 0x08FD04FF
  68. #define COLOR_YELLOW2 0xF5DEB3AA
  69. #define COLOR_RED2 0xFF0000FF
  70. #define COLOR_BLUE2 0x0000A0FF
  71. #define COLOR_LIST 0xC7C7C7FF
  72. #define COLOR_ANIM 0x8000FFFF
  73. #define COLOR_VIP 0xE9E312FF
  74. //kolory do gui
  75. #define C_GREEN "{6EF83C}"
  76. #define C_BLUE "{0000FF}"
  77. #define C_RED "{FF0000}"
  78. #define C_WHITE "{FFFFFF}"
  79. #define C_BLUE2 "{3D51DA}"
  80. #define C_YELLOW ""
  81. #define C_GREEN2 "{00FF00}"
  82. #define C_ZIELONY "{00A600}"
  83.  
  84. /////////////////////////////////////Zabawy///////////////////////////////////////////
  85. new Text:event22;
  86. new Text:event11;
  87. new SianoON;
  88. new bool:PaintbMen[MAX_PLAYERS];
  89. new bool:PaintbZaglosowal[MAX_PLAYERS];
  90. new bool:PaintbON;
  91. new bool:PaintbStartON;
  92.  
  93. new Float:PaintbSpawn[17][3] = {
  94. {885.64227294922,2262.5041503906,10.8203125},
  95. {858.53332519531,2260.9731445313,10.8203125},
  96. {846.79254150391,2219.9660644531,11.3085689},
  97. {832.21008300781,2224.9645996094,10.6599082},
  98. {847.60260009766,2278.6362304688,10.8203125},
  99. {855.65753173828,2245.0827636719,10.8203125},
  100. {865.6669921875,2255.6584472656,11.30110933},
  101. {840.81787109375,2261.4084472656,11.3011093},
  102. {876.60119628906,2221.4406738281,11.3011093},
  103. {886.18725585938,2233.6752929688,10.8203125},
  104. {875.96441650391,2255.3081054688,11.3011031},
  105. {824.82867431641,2260.0739746094,10.8260832},
  106. {854.61932373047,2242.3735351563,10.8203125},
  107. {875.47369384766,2271.9409179688,10.8203125},
  108. {854.46929931641,2224.109375,10.82031345374},
  109. {889.22772216797,2248.2478027344,10.8203125},
  110. {860.29180908203,2213.4450683594,10.8203134}
  111. };
  112.  
  113. new bool:TowerMen[MAX_PLAYERS];
  114. new bool:TowerZaglosowal[MAX_PLAYERS];
  115. new bool:TowerON;
  116. new bool:TowerStartON;
  117. new bool:HayMen[MAX_PLAYERS];
  118. new bool:HayZaglosowal[MAX_PLAYERS];
  119. new bool:HayON;
  120. new bool:HayStartON;
  121. new HayTimer;
  122.  
  123. new bool:ColorwMen[MAX_PLAYERS];
  124. new bool:ColorwZaglosowal[MAX_PLAYERS];
  125. new bool:ColorwON;
  126. new bool:ColorwStartON;
  127.  
  128. new Float:ColorwSpawn[17][3] = {
  129. {885.64227294922,2262.5041503906,10.8203125},
  130. {858.53332519531,2260.9731445313,10.8203125},
  131. {846.79254150391,2219.9660644531,11.3085689},
  132. {832.21008300781,2224.9645996094,10.6599082},
  133. {847.60260009766,2278.6362304688,10.8203125},
  134. {855.65753173828,2245.0827636719,10.8203125},
  135. {865.6669921875,2255.6584472656,11.30110933},
  136. {840.81787109375,2261.4084472656,11.3011093},
  137. {876.60119628906,2221.4406738281,11.3011093},
  138. {886.18725585938,2233.6752929688,10.8203125},
  139. {875.96441650391,2255.3081054688,11.3011031},
  140. {824.82867431641,2260.0739746094,10.8260832},
  141. {854.61932373047,2242.3735351563,10.8203125},
  142. {875.47369384766,2271.9409179688,10.8203125},
  143. {854.46929931641,2224.109375,10.82031345374},
  144. {889.22772216797,2248.2478027344,10.8203125},
  145. {860.29180908203,2213.4450683594,10.8203134}
  146. };
  147.  
  148. new DerbyCar[16];
  149. new bool:DerbyMen[MAX_GRACZY];
  150. new bool:DerbyZaglosowal[MAX_GRACZY];
  151. new bool:DerbyON;
  152. new bool:DerbyStartON;
  153. new bool:DerbyLoad;
  154.  
  155. new DragTime[MAX_GRACZY];
  156.  
  157. new bool:Strzelnica[MAX_GRACZY];
  158. new bool:StrzelnicaSniper[MAX_GRACZY];
  159. new bool:StrzelnicaON;
  160. new bool:StrzelnicaZaglosowal[MAX_GRACZY];
  161. new bool:StrzelnicaStartON;
  162.  
  163. new bool:Skoczek[MAX_GRACZY];
  164. new bool:SkoczekZaglosowa[MAX_GRACZY];
  165. new bool:SkokiStartON = false;
  166.  
  167. new bool:Labirynt[MAX_GRACZY];
  168. new bool:LabiryntZaglosowal[MAX_GRACZY];
  169. new bool:LabStartON = false;
  170. new bool:LabON = false;
  171. new LabTimer;
  172.  
  173. new CarModel;
  174. new Interior;
  175. new CPSize;
  176. new CPliczba;
  177. new Float:CPx[MAX_RACE_CHECK];
  178. new Float:CPy[MAX_RACE_CHECK];
  179. new Float:CPz[MAX_RACE_CHECK];
  180. new bool:RaceMen[MAX_GRACZY];
  181. new RaceMenLiczba = 0;
  182. new Float:SpawnAngle;
  183. new Car[10];
  184. new RaceCheck[MAX_GRACZY];
  185. new MiejsceMeta = 0;
  186. new bool:RaceWystartowal;
  187. new CountLicz = 3;
  188. new PlayerCarNum = 0;
  189. new Pozycja[MAX_RACE_CHECK];
  190. new ActualPos[MAX_GRACZY];
  191. new CPType;
  192. new RaceNitro;
  193. new RaceTimer;
  194. new RaceStartTimer;
  195. new RaceID;
  196. new RaceOnFoot;
  197.  
  198. new bool:ChowanyZapisany[MAX_GRACZY];
  199. new bool:ChowanyChceTD[MAX_GRACZY];
  200. new bool:Chowany[MAX_GRACZY];
  201. new bool:Szukajacy[MAX_GRACZY];
  202. new ChowanyKandydat[50];
  203. new bool:ChStarted = false;
  204. new ChLiczba;
  205. new SzLiczba;
  206. new ChEndTimer;
  207. new Chtimercount;
  208. new Chtimerszuk;
  209. new ChCountLiczba;
  210. new AwayCount[MAX_GRACZY];
  211. new bool:ChWystartowala;
  212. new ChArena;
  213. new ChNum;
  214. new Float:ChowPosX;
  215. new Float:ChowPosY;
  216. new Float:ChowPosZ;
  217. new Float:SzukPosX;
  218. new Float:SzukPosY;
  219. new Float:SzukPosZ;
  220. new Float:ChAreaX;
  221. new Float:ChAreaY;
  222. new Float:ChAreaZ;
  223. new Float:ChAreaA;
  224. new ChInt;
  225.  
  226. new bool:WGStarted;
  227. new ArenaZone;
  228. new WGTimer;
  229. new bool:WGKandydat[MAX_GRACZY];
  230. new WGTeam[MAX_GRACZY];
  231. new WGLiczba;
  232. new bool:WGON;
  233. new bool:WGGlos[MAX_GRACZY];
  234. new WGTeamLiczba[3];
  235. new Float:WGAreaX,Float:WGAreaY,Float:WGAreaZ,Float:WGAreaA;
  236. new InteriorWG;
  237. new WGAwayCount[MAX_GRACZY];
  238.  
  239. new CTFTimer;
  240. new CTFSpawn;
  241. new bool:CTFKandydat[MAX_GRACZY];
  242. new CTFTeam[MAX_GRACZY];
  243. new CTFLiczba;
  244. new CTFON;
  245. new bool:CTFGlos[MAX_GRACZY];
  246. new CTFTeamLiczba[2];
  247. new FlageMa = -1;
  248. new CTFScore[2];
  249. new flaga;
  250. new Text:CTFtd;
  251. new Float:CTFFlagPos[3];
  252. new Float:CTFSpawnPos[2][3];
  253. new CTFInterior;
  254.  
  255. new DragTimer;
  256. new Dragliczba;
  257. new bool:DragON;
  258. new bool:Drager[MAX_GRACZY];
  259. new DragMiejsce;
  260. new bool:Drager1[MAX_GRACZY];
  261. new bool:Drager2[MAX_GRACZY];
  262. new bool:Drager3[MAX_GRACZY];
  263. new bool:Drager4[MAX_GRACZY];
  264. new DragCheck[MAX_GRACZY];
  265. new DragTick[MAX_GRACZY];
  266.  
  267. ///////////////////////////////////////////////TexDrawy//////////////////////////////////////////////
  268. ChowanyBack = Text:TextDrawCreate(481.0,356.0, "~n~");
  269. TextDrawUseBox(ChowanyBack,1);
  270. TextDrawBoxColor(ChowanyBack,0x00000040);
  271. TextDrawTextSize(ChowanyBack,376.000000,-64.000000);
  272. TextDrawAlignment(ChowanyBack,2);
  273.  
  274. ChowanyTD[0] = Text:TextDrawCreate(485.000000,356.800000, "Chowany:");
  275. TextDrawTextSize(ChowanyTD[0],160.000000,160.000000);
  276. TextDrawAlignment(ChowanyTD[0],2);
  277. TextDrawBackgroundColor(ChowanyTD[0],0x000000ff);
  278. TextDrawFont(ChowanyTD[0],1);
  279. TextDrawColor(ChowanyTD[0],0x0080FFFF);
  280. TextDrawLetterSize(ChowanyTD[0],0.50000,1.4000);
  281. TextDrawSetProportional(ChowanyTD[0],1);
  282. TextDrawSetOutline(ChowanyTD[0],1);
  283.  
  284. ChowanyTD[1] = Text:TextDrawCreate(483.000000,360.800000, "Arena: 100~n~Szukajacych: 600~n~Chowajacych: 500");
  285. TextDrawTextSize(ChowanyTD[1],160.000000,160.000000);
  286. TextDrawAlignment(ChowanyTD[1],2);
  287. TextDrawBackgroundColor(ChowanyTD[1],0x000000ff);
  288. TextDrawFont(ChowanyTD[1],1);
  289. TextDrawLetterSize(ChowanyTD[1],0.30000,1.2000);
  290. TextDrawSetProportional(ChowanyTD[1],1);
  291. TextDrawSetOutline(ChowanyTD[1],1);
  292.  
  293. CTFtd = Text:TextDrawCreate(35, 245, "~r~---");
  294. TextDrawSetOutline(Text:CTFtd, 1);
  295. TextDrawFont(Text:CTFtd, 2);
  296. TextDrawLetterSize(Text:CTFtd, 0.35, 0.85);
  297. TextDrawSetOutline(Text:CTFtd, 1);
  298.  
  299. event11 = TextDrawCreate(11.0, 240.0, "_");
  300. TextDrawUseBox(event11, false);
  301. TextDrawColor(event11,0x32CD32AA);
  302. TextDrawTextSize(event11, 110, 350);
  303. TextDrawAlignment(event11,2);
  304. TextDrawFont(event11,1);
  305. TextDrawLetterSize(event11,0.26,0.80);
  306. TextDrawBackgroundColor(event11,0x00000030);
  307. TextDrawSetProportional(event11,1);
  308. TextDrawSetOutline(event11,1);
  309.  
  310. event22 = TextDrawCreate(30.0, 247.0, "_");
  311. TextDrawUseBox(event22, false);
  312. TextDrawColor(event22,0x009E2CFF);
  313. TextDrawTextSize(event22, 110, 350);
  314. TextDrawAlignment(event22,3);
  315. TextDrawFont(event22,1);
  316. TextDrawLetterSize(event22,0.26,0.80);
  317. TextDrawBackgroundColor(event22,0x00000035);
  318. TextDrawSetProportional(event22,1);
  319. TextDrawSetOutline(event22,1);
  320.  
  321.  
  322.  
  323. new Float:SkokiSpawn[9][3] = {
  324. {2140.6675,993.1867,1596.9131},
  325. {-853.6121,1987.3927,1554.2291},
  326. {-2308.0127,-1652.3405,1332.5613},
  327. {-1802.6826,738.5115,1524.7009},
  328. {-681.6522,-2136.8035,1508.1331},
  329. {2019.6737,-155.8575,1477.2969},
  330. {1544.9108,-1351.4625,735.3508},
  331. {367.6675,-1897.8132,1492.6903},
  332. {-2899.8555,2880.6531,685.1454}
  333. };
  334.  
  335. new Float:LabiryntSpawn[6][3] = {
  336. {1536.1250,-1565.1254,23.5469},
  337. {1514.1735,-1533.9346,23.5481},
  338. {1504.2450,-1526.6760,23.5481},
  339. {1484.5762,-1543.8284,23.5481},
  340. {1477.4609,-1536.6530,23.5481},
  341. {1479.9331,-1518.8024,23.5481}
  342. };
  343.  
  344. new Float:gRandomPlayerSpawns[4][3] = {
  345. {1070.7377, 1012.8577, 11.9759},
  346. {-934.4324, 1420.6483, 31.0865},
  347. {-2498.1541, -611.4288, 133.0497},
  348. {2254.5603,1005.2567,10.8203}
  349. };
  350.  
  351.  
  352. public OnPlayerSpawn(playerid)
  353. {
  354. TextDrawShowForPlayer(playerid,event11);
  355. TextDrawShowForPlayer(playerid,event22);
  356. }
  357.  
  358. public OnPlayerDeath(playerid, killerid, reason)
  359. {
  360.  
  361. if(RaceWystartowal){
  362. RaceMen[playerid] = false;
  363. }
  364.  
  365. if(DerbyON){
  366. DerbyMen[playerid] = false;
  367. }
  368.  
  369. if(SianoON){
  370. SianoMen[playerid] = false;
  371. }
  372.  
  373. if(HayON){
  374. HayMen[playerid] = false;
  375. }
  376.  
  377. if(PaintbON){
  378. PaintbMen[playerid] = false;
  379. }
  380.  
  381. if(ColorwON){
  382. ColorwMen[playerid] = false;
  383. }
  384.  
  385. if(TowerON){
  386. TowerMen[playerid] = false;
  387. }
  388.  
  389. if(FlageMa == playerid){
  390. CTFFlagDown(playerid);
  391. SendClientMessage(playerid,COLOR_RED2,"Flag Down!");
  392. }
  393.  
  394. if(WGTeam[playerid] > 0){
  395. WGPlayerEnd(playerid);
  396. return 1;
  397. }
  398.  
  399.  
  400.  
  401. if(ChWystartowala){
  402. if(Chowany[killerid] || Chowany[playerid]){
  403. Chowany[playerid] = false;
  404. SetPlayerPos(playerid, 2140.6675,993.1867,10.5248);
  405. PlayerSetColor(playerid);
  406. if(Chowany[killerid]){
  407. Chowany[killerid] = false;
  408. SendClientMessage(killerid,COLOR_RED2,"Zostałeś(aś) usunięty(a) z zabawy za zabijanie!");
  409. SetPlayerPos(playerid, 2140.6675,993.1867,10.5248);
  410. PlayerSetColor(playerid);
  411. }
  412. return 1;
  413. }
  414. }
  415.  
  416. if(StrzelnicaON && Strzelnica[playerid]){
  417.  
  418. Strzelnica[playerid] = false;
  419. StrzelnicaSniper[playerid] = false;
  420. new StrzLicz,SnipLicz;
  421.  
  422. foreach(Player, x){
  423. if(!StrzelnicaSniper[x] && Strzelnica[x] && IsPlayerConnected(x)){
  424. StrzLicz ++;
  425. }
  426. if(StrzelnicaSniper[x] && IsPlayerConnected(x)){
  427. SnipLicz ++;
  428. }
  429. }
  430.  
  431. if(StrzLicz <= 1){
  432. foreach(Player, x){
  433. if(!StrzelnicaSniper[x] && Strzelnica[x] && IsPlayerConnected(x)){
  434. new str[80];
  435. format(str,sizeof(str),"Na strzelnicy najdłużej wytrzymał(a) %s",PlayerName(x));
  436. SendClientMessageToAll(0x8080C0FF,str);
  437. WinSound(x);
  438. if(logged[x]){
  439. GameTextForPlayer(x,"respekt~n~~g~+7", 1000, 1);
  440. Respekt[x] += 7;
  441. }
  442. }
  443. }
  444. StrzelnicaEnd();
  445. }
  446. else if(SnipLicz <= 0){
  447. SendClientMessageToAll(COLOR_RED2,"Strzelnica przerwana z powodu braku strzelca");
  448. StrzelnicaEnd();
  449. }
  450. return 1;
  451. }
  452.  
  453. if(SoloPlayer[0] == playerid){
  454. foreach(Player, x){
  455. if(PlayerToPoint(100,x,1939.2324,-2499.2456,43.5088)){
  456. new string[50];
  457. format(string,sizeof(string),"Solo wygrywa: ~r~%s",PlayerName(SoloPlayer[1]));
  458. AnnForPlayer(x,5000,string);
  459. }
  460. }
  461. SetTimerEx("SoloEnd",1000,0,"i",playerid);
  462. return 1;
  463. }else if(SoloPlayer[1] == playerid){
  464.  
  465. foreach(Player, x){
  466. if(PlayerToPoint(100,x,1939.2324,-2499.2456,43.5088)){
  467. new string[50];
  468. format(string,sizeof(string),"Solo wygrywa: ~r~%s",PlayerName(SoloPlayer[0]));
  469. AnnForPlayer(x,5000,string);
  470. }
  471. }
  472. SetTimerEx("SoloEnd",1000,0,"i",playerid);
  473. return 1;
  474. }
  475.  
  476. public OnPlayerCommandReceived(playerid, cmdtext[])
  477. {
  478. if(Chowany[playerid] || Szukajacy[playerid] && ChWystartowala){
  479. if(strfind(cmdtext,"/chexit",true) == 0) return 1;
  480. SendClientMessage(playerid,COLOR_RED2,"Na Chowanym nie można używać komend, wyjątek: /CHexit");
  481. return 0;
  482. }
  483.  
  484. if(Strzelnica[playerid] && StrzelnicaON){
  485. if(strfind(cmdtext,"/strzelnicaexit",true) == 0) return 1;
  486. SendClientMessage(playerid,COLOR_RED2,"Na Strzelnicy nie można używać komend, wyjątek: /StrzelnicaExit");
  487. return 0;
  488. }
  489.  
  490. if(DerbyMen[playerid] && DerbyON){
  491. if(strfind(cmdtext,"/derbyexit",true) == 0) return 1;
  492. SendClientMessage(playerid,COLOR_RED2,"Na Derbach nie można używać komend, wyjątek: /DerbyExit");
  493. return 0;
  494. }
  495.  
  496.  
  497.  
  498. if(SianoMen[playerid] && SianoON){
  499. if(strfind(cmdtext,"/snexit",true) == 0) return 1;
  500. SendClientMessage(playerid,COLOR_RED,"Na Siano nie można używać komend, wyjątek: /SNexit");
  501. return 0;
  502. }
  503.  
  504.  
  505.  
  506. if(HayMen[playerid] && HayON){
  507. if(strfind(cmdtext,"/hayexit",true) == 0) return 1;
  508. SendClientMessage(playerid,COLOR_RED,"Na Hay nie można używać komend, wyjątek: /hayexit");
  509. return 0;
  510. }
  511.  
  512. if(PaintbMen[playerid] && PaintbON){
  513. if(strfind(cmdtext,"/pbexit",true) == 0) return 1;
  514. SendClientMessage(playerid,COLOR_RED,"Na PaintBall nie można używać komend, wyjątek: /PBexit");
  515. return 0;
  516. }
  517.  
  518. if(ColorwMen[playerid] && ColorwON){
  519. if(strfind(cmdtext,"/cwexit",true) == 0) return 1;
  520. SendClientMessage(playerid,COLOR_RED,"Na Color Wars nie można używać komend, wyjątek: /CWexit");
  521. return 0;
  522. }
  523.  
  524. if(TowerMen[playerid] && TowerON){
  525. if(strfind(cmdtext,"/trexit",true) == 0) return 1;
  526. SendClientMessage(playerid,COLOR_RED,"Na Tower nie można używać komend, wyjątek: /TRexit");
  527. return 0;
  528. }
  529.  
  530. if(WGTeam[playerid] == 1 || WGTeam[playerid] == 2){
  531. if(strfind(cmdtext,"/wgexit",true) == 0) return 1;
  532. SendClientMessage(playerid,COLOR_RED2,"Na Wojnie Gangów nie można używać komend, wyjątek: /WGexit");
  533. return 0;
  534. }
  535.  
  536.  
  537. if(CTFTeam[playerid] == 1 || CTFTeam[playerid] == 2){
  538. if(strfind(cmdtext,"/ctfexit",true) == 0) return 1;
  539. SendClientMessage(playerid,COLOR_RED2,"Na Capture The Flag nie można używać komend, wyjątek: /CTFexit");
  540. return 0;
  541. }
  542.  
  543. if(Labirynt[playerid]){
  544. if(strfind(cmdtext,"/labiryntexit",true) == 0) return 1;
  545. SendClientMessage(playerid,COLOR_RED2,"W labiryncie nie można używać komend, wyjątek: /LabiryntExit");
  546. return 0;
  547. }
  548.  
  549. if(SoloPlayer[0] == playerid || SoloPlayer[1] == playerid){
  550. if(strfind(cmdtext,"/soloexit",true) == 0) return 1;
  551. SendClientMessage(playerid, COLOR_RED2, "Podczas solówki nie można używać komend, wyjątek: /SoloExit");
  552. return 0;
  553. }
  554.  
  555. if(RaceWystartowal && RaceMen[playerid] || Drager[playerid]){
  556. if(strfind(cmdtext,"/nos",true) == 0) return 1;
  557. if(strfind(cmdtext,"/napraw",true) == 0) return 1;
  558. if(strfind(cmdtext,"/flip",true) == 0) return 1;
  559. if(strfind(cmdtext,"/raceexit",true) == 0) return 1;
  560. SendClientMessage(playerid, COLOR_RED2, "Na wyścigu nie można używać komend, wyjątki: /RaceExit /Napraw /Nos /Flip");
  561. return 0;
  562. }
  563. }
  564.  
  565. return 1;
  566. }
  567.  
  568. forward AtrakcjeCheck();
  569. public AtrakcjeCheck()
  570. {
  571. WGEndCheck();
  572. WGPlayerCheck();
  573. ChowanyCheck();
  574. ChowanyAreaCheck();
  575. DerbyCheck();
  576. SianoCheck();
  577. HayCheck();
  578. ColorwCheck();
  579. PaintbCheck();
  580. StrzelnicaCheck();
  581. TowerCheck();
  582. CTFUpdate();
  583. return 1;
  584. }
  585.  
  586. forward ZapisyUpdate();
  587. public ZapisyUpdate()
  588. {
  589.  
  590. new str[13][17];
  591. new strr[13][11];
  592.  
  593. new Liczba[13];
  594.  
  595. Liczba[0] = WGLiczba;
  596. Liczba[1] = CTFLiczba;
  597. Liczba[4] = RaceMenLiczba;
  598. Liczba[6] = ChNum;
  599.  
  600. for(new x=0;x<MAX_GRACZY;x++){
  601. if(IsPlayerConnected(x)){
  602.  
  603. if(PaintbMen[x]){
  604. Liczba[1] ++;
  605. }
  606.  
  607. if(DerbyMen[x]){
  608. Liczba[2] ++;
  609. }
  610.  
  611. if(Skoczek[x]){
  612. Liczba[3] ++;
  613. }
  614.  
  615. if(SianoMen[x]){
  616. Liczba[8] ++;
  617. }
  618.  
  619. if(Strzelnica[x]){
  620. Liczba[5] ++;
  621. }
  622.  
  623. if(Labirynt[x]){
  624. Liczba[7] ++;
  625. }
  626.  
  627. if(TowerMen[x]){
  628. Liczba[9] ++;
  629. }
  630.  
  631. if(ColorwMen[x]){
  632. Liczba[10] ++;
  633. }
  634.  
  635.  
  636. if(HayMen[x]){
  637. Liczba[11] ++;
  638. }
  639.  
  640.  
  641.  
  642. }
  643. }
  644.  
  645.  
  646. if(Liczba[0] < LICZBA_WG){
  647. format(str[0],16,"WG:");
  648. format(strr[0],10,"~w~%d/%d",Liczba[0],LICZBA_WG);
  649. }else{
  650. format(str[0],16,"WG:");
  651. format(strr[0],10,"~y~%d",Liczba[0]);
  652. }
  653. if(WGON){
  654. format(str[0],16,"WG:");
  655. format(strr[0],10,"~r~~h~Trwa");
  656. }
  657.  
  658. if(Liczba[1] < LICZBA_CTF){
  659. format(str[1],16,"CTF:");
  660. format(strr[1],10,"~w~%d/%d",Liczba[1],LICZBA_CTF);
  661. }else{
  662. format(str[1],16,"CTF:");
  663. format(strr[1],10,"~y~%d",Liczba[1]);
  664. }
  665. if(CTFON){
  666. format(str[1],16,"CTF:");
  667. format(strr[1],10,"~r~~h~Trwa");
  668. }
  669.  
  670. if(Liczba[2] < LICZBA_DB){
  671. format(str[2],16,"DB:");
  672. format(strr[2],10,"~w~%d/%d",Liczba[2],LICZBA_DB);
  673. }else{
  674. format(str[2],16,"DB:");
  675. format(strr[2],10,"~y~%d",Liczba[2]);
  676. }
  677. if(DerbyON || Liczba[2] >= 16){
  678. format(str[2],16,"DB:");
  679. format(strr[2],10,"~r~~h~Trwa");
  680. }
  681.  
  682. if(Liczba[3] < LICZBA_SS){
  683. format(str[3],16,"SS:");
  684. format(strr[3],10,"~w~%d/%d",Liczba[3],LICZBA_SS);
  685. }else{
  686. format(str[3],16,"SS:");
  687. format(strr[3],10,"~y~%d",Liczba[3]);
  688. }
  689.  
  690. if(Liczba[4] < LICZBA_RC){
  691. format(str[4],16,"WS:");
  692. format(strr[4],10,"~w~%d/%d",Liczba[4], LICZBA_RC);
  693. }else{
  694. format(str[4],16,"WS:");
  695. format(strr[4],10,"~y~%d",Liczba[4]);
  696. }
  697. if(RaceWystartowal || Liczba[4] >= 10){
  698. format(str[4],16,"WS:");
  699. format(strr[4],10,"~r~~h~Trwa");
  700. }
  701.  
  702.  
  703. if(Liczba[5] < LICZBA_ST){
  704. format(str[5],16,"ST:");
  705. format(strr[5],10,"~w~%d/%d",Liczba[5], LICZBA_ST);
  706. }else{
  707. format(str[5],16,"ST:");
  708. format(strr[5],10,"~y~%d",Liczba[5]);
  709. }
  710. if(StrzelnicaON){
  711. format(str[5],16,"ST:");
  712. format(strr[5],10,"~r~~h~Trwa");
  713. }
  714.  
  715.  
  716. if(Liczba[6] < LICZBA_CH){
  717. format(str[6],16,"CH:");
  718. format(strr[6],10,"~w~%d/%d",Liczba[6], LICZBA_CH);
  719. }else{
  720. format(str[6],16,"CH:");
  721. format(strr[6],10,"~y~%d",Liczba[6]);
  722. }
  723. if(ChWystartowala || Liczba[6] >= 49){
  724. format(str[6],16,"CH:");
  725. format(strr[6],10,"~r~~h~Trwa");
  726. }
  727.  
  728.  
  729. if(Liczba[7] < LICZBA_LB){
  730. format(str[7],16,"LB:");
  731. format(strr[7],10,"~w~%d/%d",Liczba[7], LICZBA_LB);
  732. }else{
  733. format(str[7],16,"LB:");
  734. format(strr[7],10,"~y~%d",Liczba[7]);
  735. }
  736. if(LabON){
  737. format(str[7],16,"LB:");
  738. format(strr[7],10,"~r~~h~Trwa");
  739. }
  740.  
  741. if(Liczba[8] < LICZBA_SN){
  742. format(str[8],16,"SO:");
  743. format(strr[8],10,"~w~%d/%d",Liczba[8],LICZBA_SN);
  744. }else{
  745. format(str[8],16,"SO:");
  746. format(strr[8],10,"~y~%d",Liczba[8]);
  747. }
  748. if(SianoON){
  749. format(str[8],16,"SO:");
  750. format(strr[8],10,"~r~TRWA");
  751. }
  752.  
  753. if(Liczba[1] < LICZBA_PB){
  754. format(str[1],16,"PL:");
  755. format(strr[1],10,"~w~%d/%d",Liczba[1],LICZBA_PB);
  756. }else{
  757. format(str[1],16,"PL:");
  758. format(strr[1],10,"~y~%d",Liczba[1]);
  759. }
  760. if(PaintbON){
  761. format(str[1],16,"PL:");
  762. format(strr[1],10,"~r~TRWA");
  763. }
  764.  
  765. if(Liczba[9] < LICZBA_TR){
  766. format(str[9],16,"WP:");
  767. format(strr[9],10,"~w~%d/%d",Liczba[9],LICZBA_TR);
  768. }else{
  769. format(str[9],16,"WP:");
  770. format(strr[9],10,"~y~%d",Liczba[9]);
  771. }
  772. if(TowerON){
  773. format(str[9],16,"WP:");
  774. format(strr[9],10,"~r~TRWA");
  775. }
  776.  
  777. if(Liczba[10] < LICZBA_CW){
  778. format(str[10],16,"CW:");
  779. format(strr[10],10,"~w~%d/%d",Liczba[10],LICZBA_CW);
  780. }else{
  781. format(str[10],16,"CW:");
  782. format(strr[10],10,"~y~%d",Liczba[10]);
  783. }
  784. if(ColorwON){
  785. format(str[10],16,"CW:");
  786. format(strr[10],10,"~r~TRWA");
  787. }
  788.  
  789.  
  790. if(Liczba[11] < LICZBA_HAY){
  791. format(str[11],16,"HAY:");
  792. format(strr[11],10,"~w~%d/%d",Liczba[11],LICZBA_HAY);
  793. }else{
  794. format(str[11],16,"HAY:");
  795. format(strr[11],10,"~y~%d",Liczba[11]);
  796. }
  797. if(HayON){
  798. format(str[11],16,"HAY:");
  799. format(strr[11],10,"~r~TRWA");
  800. }
  801.  
  802. new string[256];
  803. new string2[256];
  804. format(string,sizeof(string),"~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~",str[0],str[1],str[2],str[3],str[4],str[5],str[6],str[7],str[8],str[9],str[10],str[11]);
  805. format(string2,sizeof(string2),"~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~%s~n~~n~",strr[0],strr[1],strr[2],strr[3],strr[4],strr[5],strr[6],strr[7],strr[8],strr[9],strr[10],strr[11]);
  806.  
  807. TextDrawSetString(event11,string);
  808. TextDrawSetString(event22,string2);
  809.  
  810. return 1;
  811. }
  812.  
  813. forward CTFSpawn(playerid);
  814. public CTFSpawn(playerid)
  815. {
  816. TogglePlayerControllable(playerid, 0);
  817. SetTimerEx("JailUnfreeze", 2500, 0, "i", playerid);
  818.  
  819. if(FlageMa == -1)
  820. SetPlayerRaceCheckpoint(playerid, 2, CTFFlagPos[0], CTFFlagPos[1], CTFFlagPos[2], CTFFlagPos[0], CTFFlagPos[1], CTFFlagPos[2], 2);
  821.  
  822. switch(CTFTeam[playerid])
  823. {
  824. case 1: // niebiescy
  825. {
  826. PlayerTeleport(playerid, 0, CTFSpawnPos[0][0], CTFSpawnPos[0][1], CTFSpawnPos[0][2]);
  827. SetPlayerColor(playerid, 0x0482FFFF);
  828. }
  829. case 2: // zieloni
  830. {
  831. PlayerTeleport(playerid, 0, CTFSpawnPos[1][0], CTFSpawnPos[1][1], CTFSpawnPos[1][2]);
  832. SetPlayerColor(playerid, 0x00CC00FF);
  833. }
  834. }
  835.  
  836. SetPlayerVirtualWorld(playerid, 11);
  837. SetPlayerInterior(playerid, CTFInterior);
  838. SetPlayerHealth(playerid, 100);
  839. SetPlayerArmour(playerid, 0);
  840. ResetPlayerWeapons(playerid);
  841. GivePlayerWeapon(playerid, 4, 1);
  842. GivePlayerWeapon(playerid, 24, 1000);
  843. GivePlayerWeapon(playerid, 31, 3000);
  844. GivePlayerWeapon(playerid, 34, 3000);
  845. return 1;
  846. }
  847.  
  848. forward CTFUpdate();
  849. public CTFUpdate()
  850. {
  851. if(!CTFON)
  852. return 1;
  853.  
  854. new string[50];
  855. format(string, sizeof(string), "~b~~h~Niebiescy:~w~ %d/3~n~~g~ Zieloni:~w~ %d/3", CTFScore[0], CTFScore[1]);
  856. TextDrawSetString(CTFtd, string);
  857.  
  858. CTFTeamLiczba[0] = 0;
  859. CTFTeamLiczba[1] = 0;
  860. foreach(Player, x)
  861. {
  862. switch(CTFTeam[x])
  863. {
  864. case 1:
  865. CTFTeamLiczba[0]++;
  866. case 2:
  867. CTFTeamLiczba[1]++;
  868. }
  869. }
  870.  
  871. if(CTFTeamLiczba[0] <= 0)
  872. CTFEndWin(1);
  873. else if(CTFTeamLiczba[1] <= 0)
  874. CTFEndWin(0);
  875. return 1;
  876. }
  877.  
  878. forward CTFStart();
  879. public CTFStart()
  880. {
  881. TextDrawSetString(CTFtd, "Load...");
  882. KillTimer(CTFTimer);
  883. CTFLiczba = 0;
  884. CTFON = true;
  885. CTFTeamLiczba[0] = 0;
  886. CTFTeamLiczba[1] = 0;
  887. FlageMa = -1;
  888. CTFScore[0] = 0;
  889. CTFScore[1] = 0;
  890. DestroyObject(flaga);
  891.  
  892. new Rand = random(5);
  893. new string[32];
  894. format(string, sizeof(string), "PXS/CaptureTheFlag/%d.ini", Rand);
  895.  
  896. if(!fexist(string)) {
  897. CTFStart();
  898. return 1;
  899. }
  900.  
  901. new tmp[256];
  902. new e,f,g;
  903. tmp = dini_Get(string,"Flaga");
  904. CTFFlagPos[0] = floatstr(strtok(tmp,e,','));
  905. CTFFlagPos[1] = floatstr(strtok(tmp,e,','));
  906. CTFFlagPos[2] = floatstr(strtok(tmp,e,','));
  907. tmp = dini_Get(string,"Spawn1");
  908. CTFSpawnPos[0][0] = floatstr(strtok(tmp,f,','));
  909. CTFSpawnPos[0][1] = floatstr(strtok(tmp,f,','));
  910. CTFSpawnPos[0][2] = floatstr(strtok(tmp,f,','));
  911. tmp = dini_Get(string,"Spawn2");
  912. CTFSpawnPos[1][0] = floatstr(strtok(tmp,g,','));
  913. CTFSpawnPos[1][1] = floatstr(strtok(tmp,g,','));
  914. CTFSpawnPos[1][2] = floatstr(strtok(tmp,g,','));
  915. tmp = dini_Get(string,"Interior");
  916. CTFInterior = strval(tmp);
  917.  
  918. flaga = CreateObject(11245, CTFFlagPos[0],CTFFlagPos[1],CTFFlagPos[2], 0, 288.53997802734, 328.23999023438);
  919.  
  920. new bool:TeamCount = false;
  921. for(new x; x<MAX_GRACZY; x++)
  922. {
  923.  
  924. if(CTFKandydat[x]){
  925.  
  926. Chowany[x] = false;
  927. WGTeam[x] = 0;
  928. WGKandydat[x] = false;
  929. RaceMen[x] = false;
  930.  
  931. for(new i=0;i<50;i++){
  932. if(ChowanyKandydat[i] == x){
  933. ChowanyKandydat[i] = -1;
  934. break;
  935. }
  936. }
  937.  
  938.  
  939.  
  940. TextDrawShowForPlayer(x,CTFtd);
  941. if(TeamCount == false){
  942. CTFTeam[x] = 1;
  943. SendClientMessage(x,0x00FFFFFF,"Startujesz w drużynie niebieskich, biegnij po flage !");
  944. CTFSpawn(x);
  945. TeamCount = true;
  946. }
  947. else
  948. {
  949. CTFTeam[x] = 2;
  950. SendClientMessage(x,COLOR_GREEN,"Startujesz w drużynie zielonych, biegnij po flage !");
  951. CTFSpawn(x);
  952. TeamCount = false;
  953. }
  954.  
  955. }
  956. }
  957.  
  958.  
  959. ZapisyUpdate();
  960.  
  961. return 1;
  962. }
  963. CMD:siano(playerid,cmdtext[])
  964. {
  965. if(SianoON){
  966. SendClientMessage(playerid,COLOR_RED,"Siano już wystartowały");
  967. return 1;
  968. }
  969. if(SianoMen[playerid]){
  970. SendClientMessage(playerid,COLOR_RED,"Jesteś już zapisany(a) na Siano!");
  971. return 1;
  972. }
  973. if(SianoZaglosowal[playerid]){
  974. SendClientMessage(playerid,COLOR_RED,"Wypisałeś(aś) się już z tej rundy derbów!");
  975. return 1;
  976. }
  977. SendClientMessage(playerid,COLOR_GREEN,"Zapisałeś(aś) się na Siano");
  978. new string[500];
  979. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Siano!",PlayerName(playerid),playerid);
  980. SendClientMessageToAll(COLOR_LIGHTRED,string);
  981. SianoMen[playerid] = true;
  982. SianoZaglosowal[playerid] = true;
  983. new LiczbaSian = 0;
  984. for(new x=0;x<MAX_GRACZY;x++){
  985. if(SianoMen[x] && IsPlayerConnected(x)){
  986. LiczbaSian ++;
  987. }
  988. }
  989. ZapisyUpdate();
  990. if(LiczbaSian == 2 && !SianoStartON){
  991. SendClientMessageToAll(0xA346FFFF,"Siano wystartują za 20 sek. (Nadal Trwaja zapisy!)");
  992. SetTimer("SianoStart",20000,0);
  993. SianoStartON = true;
  994. }
  995. return 1;
  996. }
  997. CMD:snexit(playerid,cmdtext[]){
  998. #pragma unused cmdtext
  999. if(SianoMen[playerid] && SianoON){
  1000. SetPlayerRandomSpawn(playerid);
  1001. }
  1002. SianoMen[playerid] = false;
  1003. SendClientMessage(playerid,COLOR_GREEN,"Wypisałeś(aś) się z siana");
  1004. return 1;
  1005. }
  1006. CMD:cw(playerid,cmdtext[])
  1007. {
  1008. if(ColorwON){
  1009. SendClientMessage(playerid,COLOR_RED,"Color Wars już wystartowały");
  1010. return 1;
  1011. }
  1012.  
  1013. if(ColorwMen[playerid]){
  1014. SendClientMessage(playerid,COLOR_RED,"Jesteś już zapisany(a) na Color Wars!");
  1015. return 1;
  1016. }
  1017.  
  1018. if(ColorwZaglosowal[playerid]){
  1019. SendClientMessage(playerid,COLOR_RED,"Wypisałeś(aś) się już z tej rundy PaintBalla!");
  1020. return 1;
  1021. }
  1022.  
  1023.  
  1024. SendClientMessage(playerid,COLOR_GREEN,"Zapisałeś(aś) się na Color Wars");
  1025. new string[500];
  1026. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Color Wars!",PlayerName(playerid),playerid);
  1027. SendClientMessageToAll(COLOR_LIGHTRED,string);
  1028.  
  1029. ColorwMen[playerid] = true;
  1030. ColorwZaglosowal[playerid] = true;
  1031.  
  1032. new LiczbaColorw = 0;
  1033. for(new x=0;x<MAX_PLAYERS;x++){
  1034. if(ColorwMen[x] && IsPlayerConnected(x)){
  1035. LiczbaColorw ++;
  1036. }
  1037. }
  1038.  
  1039. ZapisyUpdate();
  1040.  
  1041. if(LiczbaColorw == LICZBA_CW && !ColorwStartON){
  1042. SendClientMessageToAll(0xA346FFFF,"Color Wars wystartuje za 20 sek. (Nadal Trwaja zapisy!)");
  1043. SetTimer("ColorwStart",20000,0);
  1044. ColorwStartON = true;
  1045. }
  1046.  
  1047. return 1;
  1048. }
  1049.  
  1050. CMD:cwexit(playerid,cmdtext[])
  1051. {
  1052. if(ColorwMen[playerid] && ColorwON){
  1053. SetPlayerRandomSpawn(playerid);
  1054. }
  1055. ColorwMen[playerid] = false;
  1056. SendClientMessage(playerid,COLOR_GREEN,"Wypisałeś(aś) się z Color Wars");
  1057. return 1;
  1058. }
  1059. CMD:db(playerid,cmdtext[]){
  1060. #pragma unused cmdtext
  1061.  
  1062. if(DerbyON){
  1063. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Derby już wystartowały");
  1064. return 1;
  1065. }
  1066.  
  1067. if(DerbyMen[playerid]){
  1068. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) na derby!");
  1069. return 1;
  1070. }
  1071.  
  1072. if(DerbyZaglosowal[playerid]){
  1073. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się już z tej rundy derbów!");
  1074. return 1;
  1075. }
  1076.  
  1077. new licz;
  1078. foreach(Player, x){
  1079. if(IsPlayerConnected(x) && DerbyMen[x]){
  1080. licz ++;
  1081. }
  1082. }
  1083.  
  1084. if(licz >= 16){
  1085. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Mamy już max. zapisanych, spróbuj następnym razem!");
  1086. return 1;
  1087. }
  1088.  
  1089. SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na derby");
  1090. new string[500];
  1091. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Derby!",PlayerName(playerid),playerid);
  1092. SendClientMessageToAll(COLOR_LIGHTRED,string);
  1093. DerbyMen[playerid] = true;
  1094. DerbyZaglosowal[playerid] = true;
  1095.  
  1096. new LiczbaDerb = 0;
  1097. foreach(Player, x){
  1098. if(DerbyMen[x] && IsPlayerConnected(x)){
  1099. LiczbaDerb ++;
  1100. }
  1101. }
  1102.  
  1103. ZapisyUpdate();
  1104.  
  1105. if(LiczbaDerb == 2 && !DerbyStartON){
  1106. SendClientMessageToAll(0xA346FFFF,">>>>>>{FF0000}{FFFFFF}Derby wystartują za 20 sek. (Nadal Trwaja zapisy!)");
  1107. SetTimer("DerbyStart",20000,0);
  1108. DerbyStartON = true;
  1109. }
  1110.  
  1111. return 1;
  1112. }
  1113.  
  1114.  
  1115.  
  1116. CMD:ss(playerid,cmdtext[]){
  1117. #pragma unused cmdtext
  1118.  
  1119. if(Skoczek[playerid]){
  1120. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) na skoki spadochronowe!");
  1121. return 1;
  1122. }
  1123.  
  1124. if(SkoczekZaglosowa[playerid]){
  1125. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się już z tej kolejki skoków!");
  1126. return 1;
  1127. }
  1128.  
  1129. Skoczek[playerid] = true;
  1130. SkoczekZaglosowa[playerid] = true;
  1131.  
  1132. new LiczbaSkok = 0;
  1133. foreach(Player, x){
  1134. if(Skoczek[x] && IsPlayerConnected(x)){
  1135. LiczbaSkok ++;
  1136. }
  1137. }
  1138.  
  1139. SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na skoki spadochronowe");
  1140. new string[500];
  1141. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Skoki Spadochronowe!",PlayerName(playerid),playerid);
  1142. SendClientMessageToAll(COLOR_LIGHTRED,string);
  1143. ZapisyUpdate();
  1144.  
  1145. if(LiczbaSkok == 2 && !SkokiStartON){
  1146. SendClientMessageToAll(0x009CE8FF,">>>>>>{FF0000}{FFFFFF}Skoki spadochronowe wystartują za 20 sek. (Nadal Trwaja zapisy!)");
  1147. SetTimer("SkokiSpadochronowe",20000,0);
  1148. SkokiStartON = true;
  1149. }
  1150.  
  1151. return 1;
  1152. }
  1153.  
  1154.  
  1155.  
  1156. CMD:lb(playerid,cmdtext[]){
  1157. #pragma unused cmdtext
  1158.  
  1159. if(Labirynt[playerid]){
  1160. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) do labiryntu!");
  1161. return 1;
  1162. }
  1163.  
  1164. if(LabON){
  1165. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Labirynt już wystartował!");
  1166. return 1;
  1167. }
  1168.  
  1169. if(LabiryntZaglosowal[playerid]){
  1170. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się już z tej kolejki labiryntu!");
  1171. return 1;
  1172. }
  1173.  
  1174. Labirynt[playerid] = true;
  1175. LabiryntZaglosowal[playerid] = true;
  1176.  
  1177. new LiczbaLab = 0;
  1178. foreach(Player, x){
  1179. if(Labirynt[x] && IsPlayerConnected(x)){
  1180. LiczbaLab ++;
  1181. }
  1182. }
  1183.  
  1184. SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się do labiryntu");
  1185. new string[500];
  1186. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Labirynt!",PlayerName(playerid),playerid);
  1187. SendClientMessageToAll(COLOR_LIGHTRED,string);
  1188. ZapisyUpdate();
  1189.  
  1190. if(LiczbaLab == 4 && !LabStartON){
  1191. SendClientMessageToAll(0x5EAEAEFF,">>>>>>{FF0000}{FFFFFF}Labirynt wystartuje za 20 sek. (Nadal Trwaja zapisy!)");
  1192. SetTimer("LabiryntStart",20000,0);
  1193. LabStartON = true;
  1194. KillTimer(LabTimer);
  1195. LabTimer = SetTimer("LabiryntAutoEnd",200000,false);
  1196. }
  1197.  
  1198. return 1;
  1199. }
  1200.  
  1201. CMD:hay(playerid,cmdtext[])
  1202. {
  1203. if(HayON){
  1204. SendClientMessage(playerid,COLOR_RED2,"Hay już wystartowały");
  1205. return 1;
  1206. }
  1207. if(HayMen[playerid]){
  1208. SendClientMessage(playerid,COLOR_RED2,"Jesteś już zapisany(a) na Hay!");
  1209. return 1;
  1210. }
  1211. if(HayZaglosowal[playerid]){
  1212. SendClientMessage(playerid,COLOR_RED2,"Wypisałeś(aś) się już z tej rundy Hay!");
  1213. return 1;
  1214. }
  1215. SendClientMessage(playerid,COLOR_GREEN,"Zapisałeś(aś) się na Hay");
  1216. new string[500];
  1217. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Hay!",PlayerName(playerid),playerid);
  1218. SendClientMessageToAll(COLOR_LIGHTRED,string);
  1219. HayMen[playerid] = true;
  1220. HayZaglosowal[playerid] = true;
  1221. new LiczbaHay = 0;
  1222. for(new x=0;x<MAX_GRACZY;x++){
  1223. if(HayMen[x] && IsPlayerConnected(x)){
  1224. LiczbaHay ++;
  1225. }
  1226. }
  1227. ZapisyUpdate();
  1228. if(LiczbaHay == 2 && !HayStartON){
  1229. SendClientMessageToAll(0xA346FFFF,"Hay wystartują za 20 sek. (Nadal Trwaja zapisy!)");
  1230. SetTimer("HayStart",20000,0);
  1231. HayStartON = true;
  1232. }
  1233. return 1;
  1234. }
  1235. CMD:hayexit(playerid,cmdtext[]){
  1236. #pragma unused cmdtext
  1237. if(HayMen[playerid] && HayON){
  1238. SetPlayerRandomSpawn(playerid);
  1239. }
  1240. HayMen[playerid] = false;
  1241. SendClientMessage(playerid,COLOR_GREEN,"Wypisałeś(aś) się z Hay");
  1242. return 1;
  1243. }
  1244. CMD:hayend(playerid,cmdtext[])
  1245. {
  1246. if(!Administrator[playerid]) return SendClientMessage(playerid,COLOR_RED2,"Nie jesteś Administrator'em !");
  1247. HayEnd();
  1248. SendClientMessageToAll(COLOR_BLUE,"•• |Info| Siano przerwane przez admina!");
  1249. return 1;
  1250. }
  1251.  
  1252.  
  1253. CMD:rsp(playerid,cmdtext[]){
  1254.  
  1255. if(Freeze[playerid]) return 1;
  1256.  
  1257. #pragma unused cmdtext
  1258. if(Floater[playerid]){
  1259. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Za szybko!");
  1260. return 1;
  1261. }
  1262.  
  1263. if(FloatDeath[playerid]){
  1264. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Nie można używać bezpośrednio po śmierci!");
  1265. return 1;
  1266. }
  1267.  
  1268. if(IsPlayerInAnyVehicle(playerid)){
  1269. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Nie można używać w pojazdach!");
  1270. return 1;
  1271. }
  1272. if(floatround(GetPlayerFallSpeed(playerid)) > 3){
  1273. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Nie można używać podczas spadania!");
  1274. return 1;
  1275. }
  1276.  
  1277. new Float:Angle;
  1278. new Float:x,Float:y,Float:z;
  1279. new Skin,Team;
  1280.  
  1281. Floater[playerid] = true;
  1282. GetPlayerFacingAngle(playerid, Angle);
  1283. GetPlayerPos(playerid, x, y, z);
  1284. inter = GetPlayerInterior(playerid);
  1285. Skin = GetPlayerSkin(playerid);
  1286. Team = GetPlayerTeam(playerid);
  1287. RspWorld = GetPlayerVirtualWorld(playerid);
  1288. GetPlayerWeaponData(playerid, 0, bron1, ammorsp);
  1289. GetPlayerWeaponData(playerid, 1, bron2, ammo2);
  1290. GetPlayerWeaponData(playerid, 2, bron3, ammo3);
  1291. GetPlayerWeaponData(playerid, 3, bron4, ammo4);
  1292. GetPlayerWeaponData(playerid, 4, bron5, ammo5);
  1293. GetPlayerWeaponData(playerid, 5, bron6, ammo6);
  1294. GetPlayerWeaponData(playerid, 6, bron7, ammo7);
  1295. GetPlayerWeaponData(playerid, 7, bron8, ammo8);
  1296. GetPlayerWeaponData(playerid, 8, bron9, ammo9);
  1297. GetPlayerWeaponData(playerid, 9, bron10, ammo10);
  1298. GetPlayerWeaponData(playerid, 10, bron11, ammo11);
  1299. GetPlayerWeaponData(playerid, 11, bron12, ammo12);
  1300. GetPlayerWeaponData(playerid, 12, bron13, ammo13);
  1301. PlayerPlaySound(playerid, 1083,0,0,0);
  1302. GetPlayerHealth(playerid, healthrsp);
  1303. GetPlayerArmour(playerid, armourrsp);
  1304. SetSpawnInfo(playerid,Team,Skin,x,y,z-0.5,Angle,0,0,0,0,0,0);
  1305. SpawnPlayer(playerid);
  1306.  
  1307. return 1;
  1308. }
  1309. CMD:chexit(playerid,cmdtext[]){
  1310. #pragma unused cmdtext
  1311. SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się z zabawy w chowanego!");
  1312.  
  1313. if(Chowany[playerid] && ChWystartowala){
  1314. SetPlayerHealth(playerid,100);
  1315. SetPlayerVirtualWorld(playerid,0);
  1316. SetPlayerRandomSpawn(playerid);
  1317. ResetPlayerWeapons(playerid);
  1318. }
  1319.  
  1320. Chowany[playerid] = false;
  1321. Szukajacy[playerid] = false;
  1322.  
  1323. for(new x=0;x<50;x++){
  1324. if(ChowanyKandydat[x] == playerid){
  1325. ChowanyKandydat[x] = -1;
  1326. break;
  1327. }
  1328. }
  1329.  
  1330. return 1;
  1331. }
  1332. CMD:chend(playerid,cmdtext[]){
  1333.  
  1334. if(!Administrator[playerid]) return ShowPlayerDialog(playerid,40,0,"{FFFFFF}"NazwaGI" - {FFFF00}Informacja","Brak Uprawnien Admina!","OK","");
  1335.  
  1336. #pragma unused cmdtext
  1337. #pragma unused playerid
  1338. SendClientMessageToAll(COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zabawa w chowanego przerwana przez Admina!");
  1339. ChowanyEnd();
  1340. return 1;
  1341. }
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347. CMD:ch(playerid,cmdtext[]){
  1348. #pragma unused cmdtext
  1349.  
  1350. if(Szukajacy[playerid]){
  1351. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) jako szukający!");
  1352. return 1;
  1353. }
  1354.  
  1355. if(ChWystartowala){
  1356. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zabawa już wystartowała!");
  1357. return 1;
  1358. }
  1359.  
  1360. if(ChowanyZapisany[playerid]){
  1361. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się już na chowanego!");
  1362. return 1;
  1363. }
  1364.  
  1365.  
  1366. if(ChNum > -1 && ChNum < 50){
  1367. ChowanyKandydat[ChNum] = playerid;
  1368. ChowanyZapisany[playerid] = true;
  1369. ChNum ++;
  1370. SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na zabawę w chowanego!");
  1371. new string[500];
  1372. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Chowanego!",PlayerName(playerid),playerid);
  1373. SendClientMessageToAll(COLOR_LIGHTRED,string);
  1374. ZapisyUpdate();
  1375. }else{
  1376. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zapisało się 50 garczy i jest to maksimum! Spróbuj następnym razem");
  1377. }
  1378.  
  1379. if(ChNum == 4 && !ChStarted){
  1380.  
  1381. SendClientMessageToAll(0x0080FFFF,">>>>>>{FF0000}{FFFFFF}Chowany wystartuje za 20 sek. (Nadal Trwaja zapisy!)");
  1382. KillTimer(ChEndTimer);
  1383. ChEndTimer = SetTimer("ChowanyAutoEnd",600000,false);
  1384. SetTimer("ChowanyWyznaczArene",20000,false);
  1385. ChStarted = true;
  1386.  
  1387. }
  1388.  
  1389. return 1;
  1390. }
  1391.  
  1392.  
  1393. CMD:raceend(playerid,cmdtext[]){
  1394.  
  1395. if(!Administrator[playerid]) return ShowPlayerDialog(playerid,40,0,"{FFFFFF}"NazwaGI" - {FFFF00}Informacja","Brak Uprawnien Admina!","OK","");
  1396.  
  1397. #pragma unused cmdtext
  1398. #pragma unused playerid
  1399. SendClientMessageToAll(COLOR_RED2,"Wyścig został zakończony przez Admina");
  1400. TotalRaceEnd();
  1401. return 1;
  1402. }
  1403.  
  1404.  
  1405. CMD:raceexit(playerid,cmdtext[]){
  1406. #pragma unused cmdtext
  1407. SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się z wyścigu!");
  1408.  
  1409. if(RaceWystartowal && RaceMen[playerid]){
  1410. SetPlayerVirtualWorld(playerid,0);
  1411. DisablePlayerRaceCheckpoint(playerid);
  1412. }
  1413.  
  1414. RaceMen[playerid] = false;
  1415.  
  1416. RaceMenLiczba = 0;
  1417. foreach(Player, x){
  1418. if(RaceMen[x]){
  1419. RaceMenLiczba ++;
  1420. }
  1421. }
  1422.  
  1423. if(RaceMenLiczba <= 0){
  1424. SendClientMessageToAll(COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Wyścig zakończony!");
  1425. TotalRaceEnd();
  1426. }
  1427.  
  1428. return 1;
  1429. }
  1430.  
  1431. CMD:ws(playerid,cmdtext[]){
  1432. #pragma unused cmdtext
  1433.  
  1434. RaceMenLiczba = 0;
  1435. foreach(Player, x){
  1436. if(RaceMen[x]){
  1437. RaceMenLiczba ++;
  1438. }
  1439. }
  1440.  
  1441. if(RaceWystartowal){
  1442. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wyścig już wystarował!");
  1443. return 1;
  1444. }
  1445. if(RaceMen[playerid]){
  1446. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Już jesteś zapisany(a) na ten wyścig!");
  1447. return 1;
  1448. }
  1449. if(RaceMenLiczba >= 10){
  1450. SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Mamy już pierwszych 10 kandydatów, może następnym razem ci sie uda");
  1451. return 1;
  1452. }
  1453.  
  1454. Drager[playerid] = false;
  1455. RaceMen[playerid] = true;
  1456. RaceCheck[playerid] = 0;
  1457. RaceMenLiczba ++;
  1458.  
  1459. if(RaceMenLiczba == 2){ //4
  1460. SendClientMessageToAll(0x8080FFFF,">>>>>>{FF0000}{FFFFFF}Wyścig wystartuje za 20 sek. (Nadal trwają zapisy)");
  1461. }
  1462.  
  1463. SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na wyścig! Aby się wypisać /raceexit");
  1464. new string[500];
  1465. format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Wyscig!",PlayerName(playerid),playerid);
  1466. SendClientMessageToAll(COLOR_LIGHTRED,string);
  1467. ZapisyUpdate();
  1468.  
  1469. if(RaceMenLiczba == 2){ //4
  1470. SetTimer("RaceAutoStart",20000,0);
  1471. }
  1472.  
  1473. return 1;
  1474. }
Advertisement
Add Comment
Please, Sign In to add comment