Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define LICZBA_CH 4
- #define LICZBA_RC 2
- #define LICZBA_WG 4
- #define LICZBA_CTF 4
- #define LICZBA_LB 4
- #define LICZBA_ST 4
- #define LICZBA_DB 2
- #define LICZBA_SS 2
- #define LICZBA_SN 2
- #define LICZBA_PB 2
- #define LICZBA_TR 2
- #define LICZBA_HAY 2
- #define LICZBA_SM 2
- #define LICZBA_CW 2
- #define LICZBA_US 2
- #define MAX_RACE_CHECK 50
- #define MAX_GRACZY 180
- //////////////////////////////////////Kolory//////////////////////////////////////////
- #define C_ZIELONY "{00A600}"
- #define Zielony 0x3C9605FF
- #define zielony "{69E91D}"
- #define C_INFO 0xEAB171FF
- #define C_TD 0x006dd6FF
- #define POL_ZOLTY 0xF5DC0BFF
- #define POL_NIEBIESKI 0x209CF2FF
- #define COLOR_LIGHTYELLOW 0xFAEAA9FF
- #define COLOR_LIGHTORANGE 0xF7A26FFF
- #define COLOR_VIOLET 0x9955DEEE
- #define COLOR_LIGHTRED 0xFF99AADD
- #define COLOR_SEAGREEN
- #define COLOR_BROWN 0x8F4747FF
- #define C_RED2 0x8F4747FF
- #define COLOR_KREM 0xFF8080FF
- #define COLOR_GRAYWHITE 0xEEEEFFC4
- #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
- #define COLOR_GREENISHGOLD 0xDEAD4370
- #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
- #define COLOR_NEUTRALBLUE 0xABCDEF01
- #define COLOR_LIGHTCYAN 0xAAFFCC33
- #define COLOR_LEMON 0xDDDD2357
- #define COLOR_MEDIUMBLUE 0x63AFF00A
- #define COLOR_LIGHT_ORANGE 0xFF9900AA
- #define COLOR_NEUTRAL 0xABCDEF97
- #define COLOR_BLACK 0x00000000
- #define COLOR_NEUTRALGREEN 0x81CFAB00
- #define COLOR_DARKGREEN 0x12900BBF
- #define COLOR_LIGHTGREEN 0x24FF0AB9
- #define COLOR_DARKBLUE 0x300FFAAB
- #define COLOR_BLUEGREEN 0x46BBAA00
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_DARKRED 0x660000AA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_ADMIN 0xFF0000AA
- #define COLOR_KOMENDA 0xC83322FF
- #define COLOR_BLOOD 0xE60005FF
- #define COLOR_BGREEN 0x08FD04FF
- #define COLOR_YELLOW2 0xF5DEB3AA
- #define COLOR_RED2 0xFF0000FF
- #define COLOR_BLUE2 0x0000A0FF
- #define COLOR_LIST 0xC7C7C7FF
- #define COLOR_ANIM 0x8000FFFF
- #define COLOR_VIP 0xE9E312FF
- //kolory do gui
- #define C_GREEN "{6EF83C}"
- #define C_BLUE "{0000FF}"
- #define C_RED "{FF0000}"
- #define C_WHITE "{FFFFFF}"
- #define C_BLUE2 "{3D51DA}"
- #define C_YELLOW ""
- #define C_GREEN2 "{00FF00}"
- #define C_ZIELONY "{00A600}"
- /////////////////////////////////////Zabawy///////////////////////////////////////////
- new Text:event22;
- new Text:event11;
- new SianoON;
- new bool:PaintbMen[MAX_PLAYERS];
- new bool:PaintbZaglosowal[MAX_PLAYERS];
- new bool:PaintbON;
- new bool:PaintbStartON;
- new Float:PaintbSpawn[17][3] = {
- {885.64227294922,2262.5041503906,10.8203125},
- {858.53332519531,2260.9731445313,10.8203125},
- {846.79254150391,2219.9660644531,11.3085689},
- {832.21008300781,2224.9645996094,10.6599082},
- {847.60260009766,2278.6362304688,10.8203125},
- {855.65753173828,2245.0827636719,10.8203125},
- {865.6669921875,2255.6584472656,11.30110933},
- {840.81787109375,2261.4084472656,11.3011093},
- {876.60119628906,2221.4406738281,11.3011093},
- {886.18725585938,2233.6752929688,10.8203125},
- {875.96441650391,2255.3081054688,11.3011031},
- {824.82867431641,2260.0739746094,10.8260832},
- {854.61932373047,2242.3735351563,10.8203125},
- {875.47369384766,2271.9409179688,10.8203125},
- {854.46929931641,2224.109375,10.82031345374},
- {889.22772216797,2248.2478027344,10.8203125},
- {860.29180908203,2213.4450683594,10.8203134}
- };
- new bool:TowerMen[MAX_PLAYERS];
- new bool:TowerZaglosowal[MAX_PLAYERS];
- new bool:TowerON;
- new bool:TowerStartON;
- new bool:HayMen[MAX_PLAYERS];
- new bool:HayZaglosowal[MAX_PLAYERS];
- new bool:HayON;
- new bool:HayStartON;
- new HayTimer;
- new bool:ColorwMen[MAX_PLAYERS];
- new bool:ColorwZaglosowal[MAX_PLAYERS];
- new bool:ColorwON;
- new bool:ColorwStartON;
- new Float:ColorwSpawn[17][3] = {
- {885.64227294922,2262.5041503906,10.8203125},
- {858.53332519531,2260.9731445313,10.8203125},
- {846.79254150391,2219.9660644531,11.3085689},
- {832.21008300781,2224.9645996094,10.6599082},
- {847.60260009766,2278.6362304688,10.8203125},
- {855.65753173828,2245.0827636719,10.8203125},
- {865.6669921875,2255.6584472656,11.30110933},
- {840.81787109375,2261.4084472656,11.3011093},
- {876.60119628906,2221.4406738281,11.3011093},
- {886.18725585938,2233.6752929688,10.8203125},
- {875.96441650391,2255.3081054688,11.3011031},
- {824.82867431641,2260.0739746094,10.8260832},
- {854.61932373047,2242.3735351563,10.8203125},
- {875.47369384766,2271.9409179688,10.8203125},
- {854.46929931641,2224.109375,10.82031345374},
- {889.22772216797,2248.2478027344,10.8203125},
- {860.29180908203,2213.4450683594,10.8203134}
- };
- new DerbyCar[16];
- new bool:DerbyMen[MAX_GRACZY];
- new bool:DerbyZaglosowal[MAX_GRACZY];
- new bool:DerbyON;
- new bool:DerbyStartON;
- new bool:DerbyLoad;
- new DragTime[MAX_GRACZY];
- new bool:Strzelnica[MAX_GRACZY];
- new bool:StrzelnicaSniper[MAX_GRACZY];
- new bool:StrzelnicaON;
- new bool:StrzelnicaZaglosowal[MAX_GRACZY];
- new bool:StrzelnicaStartON;
- new bool:Skoczek[MAX_GRACZY];
- new bool:SkoczekZaglosowa[MAX_GRACZY];
- new bool:SkokiStartON = false;
- new bool:Labirynt[MAX_GRACZY];
- new bool:LabiryntZaglosowal[MAX_GRACZY];
- new bool:LabStartON = false;
- new bool:LabON = false;
- new LabTimer;
- new CarModel;
- new Interior;
- new CPSize;
- new CPliczba;
- new Float:CPx[MAX_RACE_CHECK];
- new Float:CPy[MAX_RACE_CHECK];
- new Float:CPz[MAX_RACE_CHECK];
- new bool:RaceMen[MAX_GRACZY];
- new RaceMenLiczba = 0;
- new Float:SpawnAngle;
- new Car[10];
- new RaceCheck[MAX_GRACZY];
- new MiejsceMeta = 0;
- new bool:RaceWystartowal;
- new CountLicz = 3;
- new PlayerCarNum = 0;
- new Pozycja[MAX_RACE_CHECK];
- new ActualPos[MAX_GRACZY];
- new CPType;
- new RaceNitro;
- new RaceTimer;
- new RaceStartTimer;
- new RaceID;
- new RaceOnFoot;
- new bool:ChowanyZapisany[MAX_GRACZY];
- new bool:ChowanyChceTD[MAX_GRACZY];
- new bool:Chowany[MAX_GRACZY];
- new bool:Szukajacy[MAX_GRACZY];
- new ChowanyKandydat[50];
- new bool:ChStarted = false;
- new ChLiczba;
- new SzLiczba;
- new ChEndTimer;
- new Chtimercount;
- new Chtimerszuk;
- new ChCountLiczba;
- new AwayCount[MAX_GRACZY];
- new bool:ChWystartowala;
- new ChArena;
- new ChNum;
- new Float:ChowPosX;
- new Float:ChowPosY;
- new Float:ChowPosZ;
- new Float:SzukPosX;
- new Float:SzukPosY;
- new Float:SzukPosZ;
- new Float:ChAreaX;
- new Float:ChAreaY;
- new Float:ChAreaZ;
- new Float:ChAreaA;
- new ChInt;
- new bool:WGStarted;
- new ArenaZone;
- new WGTimer;
- new bool:WGKandydat[MAX_GRACZY];
- new WGTeam[MAX_GRACZY];
- new WGLiczba;
- new bool:WGON;
- new bool:WGGlos[MAX_GRACZY];
- new WGTeamLiczba[3];
- new Float:WGAreaX,Float:WGAreaY,Float:WGAreaZ,Float:WGAreaA;
- new InteriorWG;
- new WGAwayCount[MAX_GRACZY];
- new CTFTimer;
- new CTFSpawn;
- new bool:CTFKandydat[MAX_GRACZY];
- new CTFTeam[MAX_GRACZY];
- new CTFLiczba;
- new CTFON;
- new bool:CTFGlos[MAX_GRACZY];
- new CTFTeamLiczba[2];
- new FlageMa = -1;
- new CTFScore[2];
- new flaga;
- new Text:CTFtd;
- new Float:CTFFlagPos[3];
- new Float:CTFSpawnPos[2][3];
- new CTFInterior;
- new DragTimer;
- new Dragliczba;
- new bool:DragON;
- new bool:Drager[MAX_GRACZY];
- new DragMiejsce;
- new bool:Drager1[MAX_GRACZY];
- new bool:Drager2[MAX_GRACZY];
- new bool:Drager3[MAX_GRACZY];
- new bool:Drager4[MAX_GRACZY];
- new DragCheck[MAX_GRACZY];
- new DragTick[MAX_GRACZY];
- ///////////////////////////////////////////////TexDrawy//////////////////////////////////////////////
- ChowanyBack = Text:TextDrawCreate(481.0,356.0, "~n~");
- TextDrawUseBox(ChowanyBack,1);
- TextDrawBoxColor(ChowanyBack,0x00000040);
- TextDrawTextSize(ChowanyBack,376.000000,-64.000000);
- TextDrawAlignment(ChowanyBack,2);
- ChowanyTD[0] = Text:TextDrawCreate(485.000000,356.800000, "Chowany:");
- TextDrawTextSize(ChowanyTD[0],160.000000,160.000000);
- TextDrawAlignment(ChowanyTD[0],2);
- TextDrawBackgroundColor(ChowanyTD[0],0x000000ff);
- TextDrawFont(ChowanyTD[0],1);
- TextDrawColor(ChowanyTD[0],0x0080FFFF);
- TextDrawLetterSize(ChowanyTD[0],0.50000,1.4000);
- TextDrawSetProportional(ChowanyTD[0],1);
- TextDrawSetOutline(ChowanyTD[0],1);
- ChowanyTD[1] = Text:TextDrawCreate(483.000000,360.800000, "Arena: 100~n~Szukajacych: 600~n~Chowajacych: 500");
- TextDrawTextSize(ChowanyTD[1],160.000000,160.000000);
- TextDrawAlignment(ChowanyTD[1],2);
- TextDrawBackgroundColor(ChowanyTD[1],0x000000ff);
- TextDrawFont(ChowanyTD[1],1);
- TextDrawLetterSize(ChowanyTD[1],0.30000,1.2000);
- TextDrawSetProportional(ChowanyTD[1],1);
- TextDrawSetOutline(ChowanyTD[1],1);
- CTFtd = Text:TextDrawCreate(35, 245, "~r~---");
- TextDrawSetOutline(Text:CTFtd, 1);
- TextDrawFont(Text:CTFtd, 2);
- TextDrawLetterSize(Text:CTFtd, 0.35, 0.85);
- TextDrawSetOutline(Text:CTFtd, 1);
- event11 = TextDrawCreate(11.0, 240.0, "_");
- TextDrawUseBox(event11, false);
- TextDrawColor(event11,0x32CD32AA);
- TextDrawTextSize(event11, 110, 350);
- TextDrawAlignment(event11,2);
- TextDrawFont(event11,1);
- TextDrawLetterSize(event11,0.26,0.80);
- TextDrawBackgroundColor(event11,0x00000030);
- TextDrawSetProportional(event11,1);
- TextDrawSetOutline(event11,1);
- event22 = TextDrawCreate(30.0, 247.0, "_");
- TextDrawUseBox(event22, false);
- TextDrawColor(event22,0x009E2CFF);
- TextDrawTextSize(event22, 110, 350);
- TextDrawAlignment(event22,3);
- TextDrawFont(event22,1);
- TextDrawLetterSize(event22,0.26,0.80);
- TextDrawBackgroundColor(event22,0x00000035);
- TextDrawSetProportional(event22,1);
- TextDrawSetOutline(event22,1);
- new Float:SkokiSpawn[9][3] = {
- {2140.6675,993.1867,1596.9131},
- {-853.6121,1987.3927,1554.2291},
- {-2308.0127,-1652.3405,1332.5613},
- {-1802.6826,738.5115,1524.7009},
- {-681.6522,-2136.8035,1508.1331},
- {2019.6737,-155.8575,1477.2969},
- {1544.9108,-1351.4625,735.3508},
- {367.6675,-1897.8132,1492.6903},
- {-2899.8555,2880.6531,685.1454}
- };
- new Float:LabiryntSpawn[6][3] = {
- {1536.1250,-1565.1254,23.5469},
- {1514.1735,-1533.9346,23.5481},
- {1504.2450,-1526.6760,23.5481},
- {1484.5762,-1543.8284,23.5481},
- {1477.4609,-1536.6530,23.5481},
- {1479.9331,-1518.8024,23.5481}
- };
- new Float:gRandomPlayerSpawns[4][3] = {
- {1070.7377, 1012.8577, 11.9759},
- {-934.4324, 1420.6483, 31.0865},
- {-2498.1541, -611.4288, 133.0497},
- {2254.5603,1005.2567,10.8203}
- };
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid,event11);
- TextDrawShowForPlayer(playerid,event22);
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(RaceWystartowal){
- RaceMen[playerid] = false;
- }
- if(DerbyON){
- DerbyMen[playerid] = false;
- }
- if(SianoON){
- SianoMen[playerid] = false;
- }
- if(HayON){
- HayMen[playerid] = false;
- }
- if(PaintbON){
- PaintbMen[playerid] = false;
- }
- if(ColorwON){
- ColorwMen[playerid] = false;
- }
- if(TowerON){
- TowerMen[playerid] = false;
- }
- if(FlageMa == playerid){
- CTFFlagDown(playerid);
- SendClientMessage(playerid,COLOR_RED2,"Flag Down!");
- }
- if(WGTeam[playerid] > 0){
- WGPlayerEnd(playerid);
- return 1;
- }
- if(ChWystartowala){
- if(Chowany[killerid] || Chowany[playerid]){
- Chowany[playerid] = false;
- SetPlayerPos(playerid, 2140.6675,993.1867,10.5248);
- PlayerSetColor(playerid);
- if(Chowany[killerid]){
- Chowany[killerid] = false;
- SendClientMessage(killerid,COLOR_RED2,"Zostałeś(aś) usunięty(a) z zabawy za zabijanie!");
- SetPlayerPos(playerid, 2140.6675,993.1867,10.5248);
- PlayerSetColor(playerid);
- }
- return 1;
- }
- }
- if(StrzelnicaON && Strzelnica[playerid]){
- Strzelnica[playerid] = false;
- StrzelnicaSniper[playerid] = false;
- new StrzLicz,SnipLicz;
- foreach(Player, x){
- if(!StrzelnicaSniper[x] && Strzelnica[x] && IsPlayerConnected(x)){
- StrzLicz ++;
- }
- if(StrzelnicaSniper[x] && IsPlayerConnected(x)){
- SnipLicz ++;
- }
- }
- if(StrzLicz <= 1){
- foreach(Player, x){
- if(!StrzelnicaSniper[x] && Strzelnica[x] && IsPlayerConnected(x)){
- new str[80];
- format(str,sizeof(str),"Na strzelnicy najdłużej wytrzymał(a) %s",PlayerName(x));
- SendClientMessageToAll(0x8080C0FF,str);
- WinSound(x);
- if(logged[x]){
- GameTextForPlayer(x,"respekt~n~~g~+7", 1000, 1);
- Respekt[x] += 7;
- }
- }
- }
- StrzelnicaEnd();
- }
- else if(SnipLicz <= 0){
- SendClientMessageToAll(COLOR_RED2,"Strzelnica przerwana z powodu braku strzelca");
- StrzelnicaEnd();
- }
- return 1;
- }
- if(SoloPlayer[0] == playerid){
- foreach(Player, x){
- if(PlayerToPoint(100,x,1939.2324,-2499.2456,43.5088)){
- new string[50];
- format(string,sizeof(string),"Solo wygrywa: ~r~%s",PlayerName(SoloPlayer[1]));
- AnnForPlayer(x,5000,string);
- }
- }
- SetTimerEx("SoloEnd",1000,0,"i",playerid);
- return 1;
- }else if(SoloPlayer[1] == playerid){
- foreach(Player, x){
- if(PlayerToPoint(100,x,1939.2324,-2499.2456,43.5088)){
- new string[50];
- format(string,sizeof(string),"Solo wygrywa: ~r~%s",PlayerName(SoloPlayer[0]));
- AnnForPlayer(x,5000,string);
- }
- }
- SetTimerEx("SoloEnd",1000,0,"i",playerid);
- return 1;
- }
- public OnPlayerCommandReceived(playerid, cmdtext[])
- {
- if(Chowany[playerid] || Szukajacy[playerid] && ChWystartowala){
- if(strfind(cmdtext,"/chexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED2,"Na Chowanym nie można używać komend, wyjątek: /CHexit");
- return 0;
- }
- if(Strzelnica[playerid] && StrzelnicaON){
- if(strfind(cmdtext,"/strzelnicaexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED2,"Na Strzelnicy nie można używać komend, wyjątek: /StrzelnicaExit");
- return 0;
- }
- if(DerbyMen[playerid] && DerbyON){
- if(strfind(cmdtext,"/derbyexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED2,"Na Derbach nie można używać komend, wyjątek: /DerbyExit");
- return 0;
- }
- if(SianoMen[playerid] && SianoON){
- if(strfind(cmdtext,"/snexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED,"Na Siano nie można używać komend, wyjątek: /SNexit");
- return 0;
- }
- if(HayMen[playerid] && HayON){
- if(strfind(cmdtext,"/hayexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED,"Na Hay nie można używać komend, wyjątek: /hayexit");
- return 0;
- }
- if(PaintbMen[playerid] && PaintbON){
- if(strfind(cmdtext,"/pbexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED,"Na PaintBall nie można używać komend, wyjątek: /PBexit");
- return 0;
- }
- if(ColorwMen[playerid] && ColorwON){
- if(strfind(cmdtext,"/cwexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED,"Na Color Wars nie można używać komend, wyjątek: /CWexit");
- return 0;
- }
- if(TowerMen[playerid] && TowerON){
- if(strfind(cmdtext,"/trexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED,"Na Tower nie można używać komend, wyjątek: /TRexit");
- return 0;
- }
- if(WGTeam[playerid] == 1 || WGTeam[playerid] == 2){
- if(strfind(cmdtext,"/wgexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED2,"Na Wojnie Gangów nie można używać komend, wyjątek: /WGexit");
- return 0;
- }
- if(CTFTeam[playerid] == 1 || CTFTeam[playerid] == 2){
- if(strfind(cmdtext,"/ctfexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED2,"Na Capture The Flag nie można używać komend, wyjątek: /CTFexit");
- return 0;
- }
- if(Labirynt[playerid]){
- if(strfind(cmdtext,"/labiryntexit",true) == 0) return 1;
- SendClientMessage(playerid,COLOR_RED2,"W labiryncie nie można używać komend, wyjątek: /LabiryntExit");
- return 0;
- }
- if(SoloPlayer[0] == playerid || SoloPlayer[1] == playerid){
- if(strfind(cmdtext,"/soloexit",true) == 0) return 1;
- SendClientMessage(playerid, COLOR_RED2, "Podczas solówki nie można używać komend, wyjątek: /SoloExit");
- return 0;
- }
- if(RaceWystartowal && RaceMen[playerid] || Drager[playerid]){
- if(strfind(cmdtext,"/nos",true) == 0) return 1;
- if(strfind(cmdtext,"/napraw",true) == 0) return 1;
- if(strfind(cmdtext,"/flip",true) == 0) return 1;
- if(strfind(cmdtext,"/raceexit",true) == 0) return 1;
- SendClientMessage(playerid, COLOR_RED2, "Na wyścigu nie można używać komend, wyjątki: /RaceExit /Napraw /Nos /Flip");
- return 0;
- }
- }
- return 1;
- }
- forward AtrakcjeCheck();
- public AtrakcjeCheck()
- {
- WGEndCheck();
- WGPlayerCheck();
- ChowanyCheck();
- ChowanyAreaCheck();
- DerbyCheck();
- SianoCheck();
- HayCheck();
- ColorwCheck();
- PaintbCheck();
- StrzelnicaCheck();
- TowerCheck();
- CTFUpdate();
- return 1;
- }
- forward ZapisyUpdate();
- public ZapisyUpdate()
- {
- new str[13][17];
- new strr[13][11];
- new Liczba[13];
- Liczba[0] = WGLiczba;
- Liczba[1] = CTFLiczba;
- Liczba[4] = RaceMenLiczba;
- Liczba[6] = ChNum;
- for(new x=0;x<MAX_GRACZY;x++){
- if(IsPlayerConnected(x)){
- if(PaintbMen[x]){
- Liczba[1] ++;
- }
- if(DerbyMen[x]){
- Liczba[2] ++;
- }
- if(Skoczek[x]){
- Liczba[3] ++;
- }
- if(SianoMen[x]){
- Liczba[8] ++;
- }
- if(Strzelnica[x]){
- Liczba[5] ++;
- }
- if(Labirynt[x]){
- Liczba[7] ++;
- }
- if(TowerMen[x]){
- Liczba[9] ++;
- }
- if(ColorwMen[x]){
- Liczba[10] ++;
- }
- if(HayMen[x]){
- Liczba[11] ++;
- }
- }
- }
- if(Liczba[0] < LICZBA_WG){
- format(str[0],16,"WG:");
- format(strr[0],10,"~w~%d/%d",Liczba[0],LICZBA_WG);
- }else{
- format(str[0],16,"WG:");
- format(strr[0],10,"~y~%d",Liczba[0]);
- }
- if(WGON){
- format(str[0],16,"WG:");
- format(strr[0],10,"~r~~h~Trwa");
- }
- if(Liczba[1] < LICZBA_CTF){
- format(str[1],16,"CTF:");
- format(strr[1],10,"~w~%d/%d",Liczba[1],LICZBA_CTF);
- }else{
- format(str[1],16,"CTF:");
- format(strr[1],10,"~y~%d",Liczba[1]);
- }
- if(CTFON){
- format(str[1],16,"CTF:");
- format(strr[1],10,"~r~~h~Trwa");
- }
- if(Liczba[2] < LICZBA_DB){
- format(str[2],16,"DB:");
- format(strr[2],10,"~w~%d/%d",Liczba[2],LICZBA_DB);
- }else{
- format(str[2],16,"DB:");
- format(strr[2],10,"~y~%d",Liczba[2]);
- }
- if(DerbyON || Liczba[2] >= 16){
- format(str[2],16,"DB:");
- format(strr[2],10,"~r~~h~Trwa");
- }
- if(Liczba[3] < LICZBA_SS){
- format(str[3],16,"SS:");
- format(strr[3],10,"~w~%d/%d",Liczba[3],LICZBA_SS);
- }else{
- format(str[3],16,"SS:");
- format(strr[3],10,"~y~%d",Liczba[3]);
- }
- if(Liczba[4] < LICZBA_RC){
- format(str[4],16,"WS:");
- format(strr[4],10,"~w~%d/%d",Liczba[4], LICZBA_RC);
- }else{
- format(str[4],16,"WS:");
- format(strr[4],10,"~y~%d",Liczba[4]);
- }
- if(RaceWystartowal || Liczba[4] >= 10){
- format(str[4],16,"WS:");
- format(strr[4],10,"~r~~h~Trwa");
- }
- if(Liczba[5] < LICZBA_ST){
- format(str[5],16,"ST:");
- format(strr[5],10,"~w~%d/%d",Liczba[5], LICZBA_ST);
- }else{
- format(str[5],16,"ST:");
- format(strr[5],10,"~y~%d",Liczba[5]);
- }
- if(StrzelnicaON){
- format(str[5],16,"ST:");
- format(strr[5],10,"~r~~h~Trwa");
- }
- if(Liczba[6] < LICZBA_CH){
- format(str[6],16,"CH:");
- format(strr[6],10,"~w~%d/%d",Liczba[6], LICZBA_CH);
- }else{
- format(str[6],16,"CH:");
- format(strr[6],10,"~y~%d",Liczba[6]);
- }
- if(ChWystartowala || Liczba[6] >= 49){
- format(str[6],16,"CH:");
- format(strr[6],10,"~r~~h~Trwa");
- }
- if(Liczba[7] < LICZBA_LB){
- format(str[7],16,"LB:");
- format(strr[7],10,"~w~%d/%d",Liczba[7], LICZBA_LB);
- }else{
- format(str[7],16,"LB:");
- format(strr[7],10,"~y~%d",Liczba[7]);
- }
- if(LabON){
- format(str[7],16,"LB:");
- format(strr[7],10,"~r~~h~Trwa");
- }
- if(Liczba[8] < LICZBA_SN){
- format(str[8],16,"SO:");
- format(strr[8],10,"~w~%d/%d",Liczba[8],LICZBA_SN);
- }else{
- format(str[8],16,"SO:");
- format(strr[8],10,"~y~%d",Liczba[8]);
- }
- if(SianoON){
- format(str[8],16,"SO:");
- format(strr[8],10,"~r~TRWA");
- }
- if(Liczba[1] < LICZBA_PB){
- format(str[1],16,"PL:");
- format(strr[1],10,"~w~%d/%d",Liczba[1],LICZBA_PB);
- }else{
- format(str[1],16,"PL:");
- format(strr[1],10,"~y~%d",Liczba[1]);
- }
- if(PaintbON){
- format(str[1],16,"PL:");
- format(strr[1],10,"~r~TRWA");
- }
- if(Liczba[9] < LICZBA_TR){
- format(str[9],16,"WP:");
- format(strr[9],10,"~w~%d/%d",Liczba[9],LICZBA_TR);
- }else{
- format(str[9],16,"WP:");
- format(strr[9],10,"~y~%d",Liczba[9]);
- }
- if(TowerON){
- format(str[9],16,"WP:");
- format(strr[9],10,"~r~TRWA");
- }
- if(Liczba[10] < LICZBA_CW){
- format(str[10],16,"CW:");
- format(strr[10],10,"~w~%d/%d",Liczba[10],LICZBA_CW);
- }else{
- format(str[10],16,"CW:");
- format(strr[10],10,"~y~%d",Liczba[10]);
- }
- if(ColorwON){
- format(str[10],16,"CW:");
- format(strr[10],10,"~r~TRWA");
- }
- if(Liczba[11] < LICZBA_HAY){
- format(str[11],16,"HAY:");
- format(strr[11],10,"~w~%d/%d",Liczba[11],LICZBA_HAY);
- }else{
- format(str[11],16,"HAY:");
- format(strr[11],10,"~y~%d",Liczba[11]);
- }
- if(HayON){
- format(str[11],16,"HAY:");
- format(strr[11],10,"~r~TRWA");
- }
- new string[256];
- new string2[256];
- 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]);
- 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]);
- TextDrawSetString(event11,string);
- TextDrawSetString(event22,string2);
- return 1;
- }
- forward CTFSpawn(playerid);
- public CTFSpawn(playerid)
- {
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("JailUnfreeze", 2500, 0, "i", playerid);
- if(FlageMa == -1)
- SetPlayerRaceCheckpoint(playerid, 2, CTFFlagPos[0], CTFFlagPos[1], CTFFlagPos[2], CTFFlagPos[0], CTFFlagPos[1], CTFFlagPos[2], 2);
- switch(CTFTeam[playerid])
- {
- case 1: // niebiescy
- {
- PlayerTeleport(playerid, 0, CTFSpawnPos[0][0], CTFSpawnPos[0][1], CTFSpawnPos[0][2]);
- SetPlayerColor(playerid, 0x0482FFFF);
- }
- case 2: // zieloni
- {
- PlayerTeleport(playerid, 0, CTFSpawnPos[1][0], CTFSpawnPos[1][1], CTFSpawnPos[1][2]);
- SetPlayerColor(playerid, 0x00CC00FF);
- }
- }
- SetPlayerVirtualWorld(playerid, 11);
- SetPlayerInterior(playerid, CTFInterior);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerWeapon(playerid, 31, 3000);
- GivePlayerWeapon(playerid, 34, 3000);
- return 1;
- }
- forward CTFUpdate();
- public CTFUpdate()
- {
- if(!CTFON)
- return 1;
- new string[50];
- format(string, sizeof(string), "~b~~h~Niebiescy:~w~ %d/3~n~~g~ Zieloni:~w~ %d/3", CTFScore[0], CTFScore[1]);
- TextDrawSetString(CTFtd, string);
- CTFTeamLiczba[0] = 0;
- CTFTeamLiczba[1] = 0;
- foreach(Player, x)
- {
- switch(CTFTeam[x])
- {
- case 1:
- CTFTeamLiczba[0]++;
- case 2:
- CTFTeamLiczba[1]++;
- }
- }
- if(CTFTeamLiczba[0] <= 0)
- CTFEndWin(1);
- else if(CTFTeamLiczba[1] <= 0)
- CTFEndWin(0);
- return 1;
- }
- forward CTFStart();
- public CTFStart()
- {
- TextDrawSetString(CTFtd, "Load...");
- KillTimer(CTFTimer);
- CTFLiczba = 0;
- CTFON = true;
- CTFTeamLiczba[0] = 0;
- CTFTeamLiczba[1] = 0;
- FlageMa = -1;
- CTFScore[0] = 0;
- CTFScore[1] = 0;
- DestroyObject(flaga);
- new Rand = random(5);
- new string[32];
- format(string, sizeof(string), "PXS/CaptureTheFlag/%d.ini", Rand);
- if(!fexist(string)) {
- CTFStart();
- return 1;
- }
- new tmp[256];
- new e,f,g;
- tmp = dini_Get(string,"Flaga");
- CTFFlagPos[0] = floatstr(strtok(tmp,e,','));
- CTFFlagPos[1] = floatstr(strtok(tmp,e,','));
- CTFFlagPos[2] = floatstr(strtok(tmp,e,','));
- tmp = dini_Get(string,"Spawn1");
- CTFSpawnPos[0][0] = floatstr(strtok(tmp,f,','));
- CTFSpawnPos[0][1] = floatstr(strtok(tmp,f,','));
- CTFSpawnPos[0][2] = floatstr(strtok(tmp,f,','));
- tmp = dini_Get(string,"Spawn2");
- CTFSpawnPos[1][0] = floatstr(strtok(tmp,g,','));
- CTFSpawnPos[1][1] = floatstr(strtok(tmp,g,','));
- CTFSpawnPos[1][2] = floatstr(strtok(tmp,g,','));
- tmp = dini_Get(string,"Interior");
- CTFInterior = strval(tmp);
- flaga = CreateObject(11245, CTFFlagPos[0],CTFFlagPos[1],CTFFlagPos[2], 0, 288.53997802734, 328.23999023438);
- new bool:TeamCount = false;
- for(new x; x<MAX_GRACZY; x++)
- {
- if(CTFKandydat[x]){
- Chowany[x] = false;
- WGTeam[x] = 0;
- WGKandydat[x] = false;
- RaceMen[x] = false;
- for(new i=0;i<50;i++){
- if(ChowanyKandydat[i] == x){
- ChowanyKandydat[i] = -1;
- break;
- }
- }
- TextDrawShowForPlayer(x,CTFtd);
- if(TeamCount == false){
- CTFTeam[x] = 1;
- SendClientMessage(x,0x00FFFFFF,"Startujesz w drużynie niebieskich, biegnij po flage !");
- CTFSpawn(x);
- TeamCount = true;
- }
- else
- {
- CTFTeam[x] = 2;
- SendClientMessage(x,COLOR_GREEN,"Startujesz w drużynie zielonych, biegnij po flage !");
- CTFSpawn(x);
- TeamCount = false;
- }
- }
- }
- ZapisyUpdate();
- return 1;
- }
- CMD:siano(playerid,cmdtext[])
- {
- if(SianoON){
- SendClientMessage(playerid,COLOR_RED,"Siano już wystartowały");
- return 1;
- }
- if(SianoMen[playerid]){
- SendClientMessage(playerid,COLOR_RED,"Jesteś już zapisany(a) na Siano!");
- return 1;
- }
- if(SianoZaglosowal[playerid]){
- SendClientMessage(playerid,COLOR_RED,"Wypisałeś(aś) się już z tej rundy derbów!");
- return 1;
- }
- SendClientMessage(playerid,COLOR_GREEN,"Zapisałeś(aś) się na Siano");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Siano!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- SianoMen[playerid] = true;
- SianoZaglosowal[playerid] = true;
- new LiczbaSian = 0;
- for(new x=0;x<MAX_GRACZY;x++){
- if(SianoMen[x] && IsPlayerConnected(x)){
- LiczbaSian ++;
- }
- }
- ZapisyUpdate();
- if(LiczbaSian == 2 && !SianoStartON){
- SendClientMessageToAll(0xA346FFFF,"Siano wystartują za 20 sek. (Nadal Trwaja zapisy!)");
- SetTimer("SianoStart",20000,0);
- SianoStartON = true;
- }
- return 1;
- }
- CMD:snexit(playerid,cmdtext[]){
- #pragma unused cmdtext
- if(SianoMen[playerid] && SianoON){
- SetPlayerRandomSpawn(playerid);
- }
- SianoMen[playerid] = false;
- SendClientMessage(playerid,COLOR_GREEN,"Wypisałeś(aś) się z siana");
- return 1;
- }
- CMD:cw(playerid,cmdtext[])
- {
- if(ColorwON){
- SendClientMessage(playerid,COLOR_RED,"Color Wars już wystartowały");
- return 1;
- }
- if(ColorwMen[playerid]){
- SendClientMessage(playerid,COLOR_RED,"Jesteś już zapisany(a) na Color Wars!");
- return 1;
- }
- if(ColorwZaglosowal[playerid]){
- SendClientMessage(playerid,COLOR_RED,"Wypisałeś(aś) się już z tej rundy PaintBalla!");
- return 1;
- }
- SendClientMessage(playerid,COLOR_GREEN,"Zapisałeś(aś) się na Color Wars");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Color Wars!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- ColorwMen[playerid] = true;
- ColorwZaglosowal[playerid] = true;
- new LiczbaColorw = 0;
- for(new x=0;x<MAX_PLAYERS;x++){
- if(ColorwMen[x] && IsPlayerConnected(x)){
- LiczbaColorw ++;
- }
- }
- ZapisyUpdate();
- if(LiczbaColorw == LICZBA_CW && !ColorwStartON){
- SendClientMessageToAll(0xA346FFFF,"Color Wars wystartuje za 20 sek. (Nadal Trwaja zapisy!)");
- SetTimer("ColorwStart",20000,0);
- ColorwStartON = true;
- }
- return 1;
- }
- CMD:cwexit(playerid,cmdtext[])
- {
- if(ColorwMen[playerid] && ColorwON){
- SetPlayerRandomSpawn(playerid);
- }
- ColorwMen[playerid] = false;
- SendClientMessage(playerid,COLOR_GREEN,"Wypisałeś(aś) się z Color Wars");
- return 1;
- }
- CMD:db(playerid,cmdtext[]){
- #pragma unused cmdtext
- if(DerbyON){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Derby już wystartowały");
- return 1;
- }
- if(DerbyMen[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) na derby!");
- return 1;
- }
- if(DerbyZaglosowal[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się już z tej rundy derbów!");
- return 1;
- }
- new licz;
- foreach(Player, x){
- if(IsPlayerConnected(x) && DerbyMen[x]){
- licz ++;
- }
- }
- if(licz >= 16){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Mamy już max. zapisanych, spróbuj następnym razem!");
- return 1;
- }
- SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na derby");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Derby!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- DerbyMen[playerid] = true;
- DerbyZaglosowal[playerid] = true;
- new LiczbaDerb = 0;
- foreach(Player, x){
- if(DerbyMen[x] && IsPlayerConnected(x)){
- LiczbaDerb ++;
- }
- }
- ZapisyUpdate();
- if(LiczbaDerb == 2 && !DerbyStartON){
- SendClientMessageToAll(0xA346FFFF,">>>>>>{FF0000}{FFFFFF}Derby wystartują za 20 sek. (Nadal Trwaja zapisy!)");
- SetTimer("DerbyStart",20000,0);
- DerbyStartON = true;
- }
- return 1;
- }
- CMD:ss(playerid,cmdtext[]){
- #pragma unused cmdtext
- if(Skoczek[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) na skoki spadochronowe!");
- return 1;
- }
- if(SkoczekZaglosowa[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się już z tej kolejki skoków!");
- return 1;
- }
- Skoczek[playerid] = true;
- SkoczekZaglosowa[playerid] = true;
- new LiczbaSkok = 0;
- foreach(Player, x){
- if(Skoczek[x] && IsPlayerConnected(x)){
- LiczbaSkok ++;
- }
- }
- SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na skoki spadochronowe");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Skoki Spadochronowe!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- ZapisyUpdate();
- if(LiczbaSkok == 2 && !SkokiStartON){
- SendClientMessageToAll(0x009CE8FF,">>>>>>{FF0000}{FFFFFF}Skoki spadochronowe wystartują za 20 sek. (Nadal Trwaja zapisy!)");
- SetTimer("SkokiSpadochronowe",20000,0);
- SkokiStartON = true;
- }
- return 1;
- }
- CMD:lb(playerid,cmdtext[]){
- #pragma unused cmdtext
- if(Labirynt[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) do labiryntu!");
- return 1;
- }
- if(LabON){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Labirynt już wystartował!");
- return 1;
- }
- if(LabiryntZaglosowal[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się już z tej kolejki labiryntu!");
- return 1;
- }
- Labirynt[playerid] = true;
- LabiryntZaglosowal[playerid] = true;
- new LiczbaLab = 0;
- foreach(Player, x){
- if(Labirynt[x] && IsPlayerConnected(x)){
- LiczbaLab ++;
- }
- }
- SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się do labiryntu");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Labirynt!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- ZapisyUpdate();
- if(LiczbaLab == 4 && !LabStartON){
- SendClientMessageToAll(0x5EAEAEFF,">>>>>>{FF0000}{FFFFFF}Labirynt wystartuje za 20 sek. (Nadal Trwaja zapisy!)");
- SetTimer("LabiryntStart",20000,0);
- LabStartON = true;
- KillTimer(LabTimer);
- LabTimer = SetTimer("LabiryntAutoEnd",200000,false);
- }
- return 1;
- }
- CMD:hay(playerid,cmdtext[])
- {
- if(HayON){
- SendClientMessage(playerid,COLOR_RED2,"Hay już wystartowały");
- return 1;
- }
- if(HayMen[playerid]){
- SendClientMessage(playerid,COLOR_RED2,"Jesteś już zapisany(a) na Hay!");
- return 1;
- }
- if(HayZaglosowal[playerid]){
- SendClientMessage(playerid,COLOR_RED2,"Wypisałeś(aś) się już z tej rundy Hay!");
- return 1;
- }
- SendClientMessage(playerid,COLOR_GREEN,"Zapisałeś(aś) się na Hay");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Hay!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- HayMen[playerid] = true;
- HayZaglosowal[playerid] = true;
- new LiczbaHay = 0;
- for(new x=0;x<MAX_GRACZY;x++){
- if(HayMen[x] && IsPlayerConnected(x)){
- LiczbaHay ++;
- }
- }
- ZapisyUpdate();
- if(LiczbaHay == 2 && !HayStartON){
- SendClientMessageToAll(0xA346FFFF,"Hay wystartują za 20 sek. (Nadal Trwaja zapisy!)");
- SetTimer("HayStart",20000,0);
- HayStartON = true;
- }
- return 1;
- }
- CMD:hayexit(playerid,cmdtext[]){
- #pragma unused cmdtext
- if(HayMen[playerid] && HayON){
- SetPlayerRandomSpawn(playerid);
- }
- HayMen[playerid] = false;
- SendClientMessage(playerid,COLOR_GREEN,"Wypisałeś(aś) się z Hay");
- return 1;
- }
- CMD:hayend(playerid,cmdtext[])
- {
- if(!Administrator[playerid]) return SendClientMessage(playerid,COLOR_RED2,"Nie jesteś Administrator'em !");
- HayEnd();
- SendClientMessageToAll(COLOR_BLUE,"•• |Info| Siano przerwane przez admina!");
- return 1;
- }
- CMD:rsp(playerid,cmdtext[]){
- if(Freeze[playerid]) return 1;
- #pragma unused cmdtext
- if(Floater[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Za szybko!");
- return 1;
- }
- if(FloatDeath[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Nie można używać bezpośrednio po śmierci!");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Nie można używać w pojazdach!");
- return 1;
- }
- if(floatround(GetPlayerFallSpeed(playerid)) > 3){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Nie można używać podczas spadania!");
- return 1;
- }
- new Float:Angle;
- new Float:x,Float:y,Float:z;
- new Skin,Team;
- Floater[playerid] = true;
- GetPlayerFacingAngle(playerid, Angle);
- GetPlayerPos(playerid, x, y, z);
- inter = GetPlayerInterior(playerid);
- Skin = GetPlayerSkin(playerid);
- Team = GetPlayerTeam(playerid);
- RspWorld = GetPlayerVirtualWorld(playerid);
- GetPlayerWeaponData(playerid, 0, bron1, ammorsp);
- GetPlayerWeaponData(playerid, 1, bron2, ammo2);
- GetPlayerWeaponData(playerid, 2, bron3, ammo3);
- GetPlayerWeaponData(playerid, 3, bron4, ammo4);
- GetPlayerWeaponData(playerid, 4, bron5, ammo5);
- GetPlayerWeaponData(playerid, 5, bron6, ammo6);
- GetPlayerWeaponData(playerid, 6, bron7, ammo7);
- GetPlayerWeaponData(playerid, 7, bron8, ammo8);
- GetPlayerWeaponData(playerid, 8, bron9, ammo9);
- GetPlayerWeaponData(playerid, 9, bron10, ammo10);
- GetPlayerWeaponData(playerid, 10, bron11, ammo11);
- GetPlayerWeaponData(playerid, 11, bron12, ammo12);
- GetPlayerWeaponData(playerid, 12, bron13, ammo13);
- PlayerPlaySound(playerid, 1083,0,0,0);
- GetPlayerHealth(playerid, healthrsp);
- GetPlayerArmour(playerid, armourrsp);
- SetSpawnInfo(playerid,Team,Skin,x,y,z-0.5,Angle,0,0,0,0,0,0);
- SpawnPlayer(playerid);
- return 1;
- }
- CMD:chexit(playerid,cmdtext[]){
- #pragma unused cmdtext
- SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się z zabawy w chowanego!");
- if(Chowany[playerid] && ChWystartowala){
- SetPlayerHealth(playerid,100);
- SetPlayerVirtualWorld(playerid,0);
- SetPlayerRandomSpawn(playerid);
- ResetPlayerWeapons(playerid);
- }
- Chowany[playerid] = false;
- Szukajacy[playerid] = false;
- for(new x=0;x<50;x++){
- if(ChowanyKandydat[x] == playerid){
- ChowanyKandydat[x] = -1;
- break;
- }
- }
- return 1;
- }
- CMD:chend(playerid,cmdtext[]){
- if(!Administrator[playerid]) return ShowPlayerDialog(playerid,40,0,"{FFFFFF}"NazwaGI" - {FFFF00}Informacja","Brak Uprawnien Admina!","OK","");
- #pragma unused cmdtext
- #pragma unused playerid
- SendClientMessageToAll(COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zabawa w chowanego przerwana przez Admina!");
- ChowanyEnd();
- return 1;
- }
- CMD:ch(playerid,cmdtext[]){
- #pragma unused cmdtext
- if(Szukajacy[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Jesteś już zapisany(a) jako szukający!");
- return 1;
- }
- if(ChWystartowala){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zabawa już wystartowała!");
- return 1;
- }
- if(ChowanyZapisany[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się już na chowanego!");
- return 1;
- }
- if(ChNum > -1 && ChNum < 50){
- ChowanyKandydat[ChNum] = playerid;
- ChowanyZapisany[playerid] = true;
- ChNum ++;
- SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na zabawę w chowanego!");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Chowanego!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- ZapisyUpdate();
- }else{
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Zapisało się 50 garczy i jest to maksimum! Spróbuj następnym razem");
- }
- if(ChNum == 4 && !ChStarted){
- SendClientMessageToAll(0x0080FFFF,">>>>>>{FF0000}{FFFFFF}Chowany wystartuje za 20 sek. (Nadal Trwaja zapisy!)");
- KillTimer(ChEndTimer);
- ChEndTimer = SetTimer("ChowanyAutoEnd",600000,false);
- SetTimer("ChowanyWyznaczArene",20000,false);
- ChStarted = true;
- }
- return 1;
- }
- CMD:raceend(playerid,cmdtext[]){
- if(!Administrator[playerid]) return ShowPlayerDialog(playerid,40,0,"{FFFFFF}"NazwaGI" - {FFFF00}Informacja","Brak Uprawnien Admina!","OK","");
- #pragma unused cmdtext
- #pragma unused playerid
- SendClientMessageToAll(COLOR_RED2,"Wyścig został zakończony przez Admina");
- TotalRaceEnd();
- return 1;
- }
- CMD:raceexit(playerid,cmdtext[]){
- #pragma unused cmdtext
- SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Wypisałeś(aś) się z wyścigu!");
- if(RaceWystartowal && RaceMen[playerid]){
- SetPlayerVirtualWorld(playerid,0);
- DisablePlayerRaceCheckpoint(playerid);
- }
- RaceMen[playerid] = false;
- RaceMenLiczba = 0;
- foreach(Player, x){
- if(RaceMen[x]){
- RaceMenLiczba ++;
- }
- }
- if(RaceMenLiczba <= 0){
- SendClientMessageToAll(COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Wyścig zakończony!");
- TotalRaceEnd();
- }
- return 1;
- }
- CMD:ws(playerid,cmdtext[]){
- #pragma unused cmdtext
- RaceMenLiczba = 0;
- foreach(Player, x){
- if(RaceMen[x]){
- RaceMenLiczba ++;
- }
- }
- if(RaceWystartowal){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Wyścig już wystarował!");
- return 1;
- }
- if(RaceMen[playerid]){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Już jesteś zapisany(a) na ten wyścig!");
- return 1;
- }
- if(RaceMenLiczba >= 10){
- SendClientMessage(playerid,COLOR_RED2,">>>>>>{FF0000}{FFFFFF}Mamy już pierwszych 10 kandydatów, może następnym razem ci sie uda");
- return 1;
- }
- Drager[playerid] = false;
- RaceMen[playerid] = true;
- RaceCheck[playerid] = 0;
- RaceMenLiczba ++;
- if(RaceMenLiczba == 2){ //4
- SendClientMessageToAll(0x8080FFFF,">>>>>>{FF0000}{FFFFFF}Wyścig wystartuje za 20 sek. (Nadal trwają zapisy)");
- }
- SendClientMessage(playerid,COLOR_GREEN,">>>>>>{FF0000}{FFFFFF}Zapisałeś(aś) się na wyścig! Aby się wypisać /raceexit");
- new string[500];
- format(string, sizeof(string), "{00FF00}+ {C0C0C0}%s (%d){999999} zapisał(a) się na {C0C0C0}Wyscig!",PlayerName(playerid),playerid);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- ZapisyUpdate();
- if(RaceMenLiczba == 2){ //4
- SetTimer("RaceAutoStart",20000,0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment