Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/war", true) == 0)
- {
- if(IsAMafia(playerid))
- {
- new rhour, rminute, rsecond, zone[MAX_ZONE_NAME];
- GetPlayer2DRadarZone(playerid, zone, sizeof(zone));
- gettime(rhour, rminute, rsecond);
- if(rhour < 6) return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Nu poti declansa un razboi in toiul noptii!");
- new side[MAX_PLAYERS], ncount=0;
- if(PlayerInfo[playerid][pLeader] != 0) side[playerid] = PlayerInfo[playerid][pLeader]; else if(PlayerInfo[playerid][pMember] != 0) side[playerid] = PlayerInfo[playerid][pMember];
- for(new n=1; n<sizeof(GangInfo); n++)
- {
- if(GangInfo[n][gFaction] == side[playerid]) ncount++;
- }
- if(PlayerInfo[playerid][pRank] >= 5) {} else return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Nu ai rangul necesar!");
- if(ncount >= 16) return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Deja detii 16 teritorii!");
- if(GetPlayerInterior(playerid) != 0) return 1;
- if(War != 0) return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Este deja un razboi in desfasurare!");
- new ward;
- if(Warallowed == 0) return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Un admin a inchis sistemul de razboaie temporar!");
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(IsPlayerInArea(playerid, 114.21, 506.54, -1364.93, -912.91)) ward = 1;
- else if(IsPlayerInArea(playerid, 506.54, 899.25, -1364.93, -912.91)) ward = 2;
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -1313.70, -912.91)) ward = 3;
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -1364.93, -912.91)) ward = 4;
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -1364.93, -912.91)) ward = 5;
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -1364.93, -912.91)) ward = 6;
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -1313.70, -912.91)) ward = 7;
- else if(IsPlayerInArea(playerid, 114.21, 506.54, -1821.03, -1364.93)) ward = 8;
- else if(IsPlayerInArea(playerid, 506.54, 899.25, -1821.03, -1364.93)) ward = 9;
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -1721.90, -1313.70)) ward = 10;
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -1821.03, -1364.93)) ward = 11;
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -1821.03, -1364.93)) ward = 12;
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -1821.03, -1364.93)) ward = 13;
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -1737.65, -1313.70)) ward = 14;
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -2131.32, -1721.90)) ward = 15;
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -2489.99, -2131.32)) ward = 16;
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -2250.92, -1821.03)) ward = 17;
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -2250.92, -1821.03)) ward = 18;
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -2250.92, -1821.03)) ward = 19;
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -2172.41, -1737.65)) ward = 20;
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -2690.47, -2250.92)) ward = 21;
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -2690.47, -2250.92)) ward = 22;
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -2690.47, -2250.92)) ward = 23;
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -2567.91, -2172.41)) ward = 24;
- else if(IsPlayerInArea(playerid, 1114.47, 1478.16, 2444.49, 2901.03)) ward = 25;
- else if(IsPlayerInArea(playerid, 1478.16, 1828.16, 2444.49, 2901.03)) ward = 26;
- else if(IsPlayerInArea(playerid, 1828.16, 2150.16, 2444.49, 2901.03)) ward = 27;
- else if(IsPlayerInArea(playerid, 2150.16, 2528.16, 2444.49, 2901.03)) ward = 28;
- else if(IsPlayerInArea(playerid, 2528.16, 2878.16, 2444.49, 2901.03)) ward = 29;
- else if(IsPlayerInArea(playerid, 901.16, 1307.16, 1980.34, 2444.49)) ward = 30;
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 1980.34, 2444.49)) ward = 31;
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 1980.34, 2444.49)) ward = 32;
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 1980.34, 2444.49)) ward = 33;
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 1980.34, 2444.49)) ward = 34;
- else if(IsPlayerInArea(playerid, 901.16, 1307.16, 1528.09, 1980.34)) ward = 35;
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 1528.09, 1980.34)) ward = 36;
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 1528.09, 1980.34)) ward = 37;
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 1528.09, 1980.34)) ward = 38;
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 1528.09, 1980.34)) ward = 39;
- else if(IsPlayerInArea(playerid, 901.16, 1307.16, 1074.90, 1528.09)) ward = 40;
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 1074.90, 1528.09)) ward = 41;
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 1074.90, 1528.09)) ward = 42;
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 1074.90, 1528.09)) ward = 43;
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 1074.90, 1528.09)) ward = 44;
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 663.83, 1074.90)) ward = 45;
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 663.83, 1074.90)) ward = 46;
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 663.83, 1074.90)) ward = 47;
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 663.83, 1074.90)) ward = 48;
- else return 1;
- format(string, sizeof(string), "{00D7D7}War: {FFFFFF}Acest teritoriu a fost deja ocupat acum %d ore.", GangInfo[ward][gHours]);
- if(GangInfo[ward][gHours] > 0 && AdminDuty[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, string);
- //if(PlayerInfo[playerid][pLeader] >= 1) {} else return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Trebuie sa fii liderul unei mafie!");
- new ftext[60], ftext1[60];
- if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) format(ftext, sizeof(ftext), "{5F361E}Familia Dallas{FFFFFF}");
- if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) format(ftext, sizeof(ftext), "{C8C1BF}Familia Falcone{FFFFFF}");
- if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) format(ftext, sizeof(ftext), "{7716A0}Familia Bonanno{FFFFFF}");
- if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) format(ftext, sizeof(ftext), "{D4AA1E}Familia Orleans{FFFFFF}");
- if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) format(ftext, sizeof(ftext), "{17B41F}Familia 15th Avenue{FFFFFF}");
- if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) format(ftext, sizeof(ftext), "{1CCDB5}Sacra Corona Unita{FFFFFF}");
- if(GangInfo[ward][gFaction] == 5) format(ftext1, sizeof(ftext1), "{5F361E}Familiei Dallas{FFFFFF}");
- if(GangInfo[ward][gFaction] == 6) format(ftext1, sizeof(ftext1), "{C8C1BF}Familiei Falcone{FFFFFF}");
- if(GangInfo[ward][gFaction] == 12) format(ftext1, sizeof(ftext1), "{7716A0}Familiei Bonanno{FFFFFF}");
- if(GangInfo[ward][gFaction] == 13) format(ftext1, sizeof(ftext1), "{D4AA1E}Familiei Orleans{FFFFFF}");
- if(GangInfo[ward][gFaction] == 14) format(ftext1, sizeof(ftext1), "{17B41F}Familiei 15Avenue{FFFFFF}");
- if(GangInfo[ward][gFaction] == 15) format(ftext1, sizeof(ftext1), "{1CCDB5}Sacra Corona Unita{FFFFFF}");
- if(IsAAAlliance(playerid) && GangInfo[ward][gFaction] == 5 || IsAAAlliance(playerid) && GangInfo[ward][gFaction] == 14 || IsAAAlliance(playerid) && GangInfo[ward][gFaction] == 13)
- return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Alianta ta deja a ocupat acest teritoriu!");
- if(IsAIAlliance(playerid) && GangInfo[ward][gFaction] == 6 || IsAIAlliance(playerid) && GangInfo[ward][gFaction] == 12 || IsAIAlliance(playerid) && GangInfo[ward][gFaction] == 15)
- return SendClientMessage(playerid, COLOR_WHITE, "{00D7D7}War: {FFFFFF}Alianta ta deja a ocupat acest teritoriu!");
- format(string, sizeof(string), "(( Gang News: )) %s a declansat un razboi impotriva %s!", ftext, ftext1);
- BroadCast(0x8D8DFFFF,string);
- format(string, sizeof(string), "(( Gang News: )) {FFFFFF}Razboiul se desfasoara in zona %s! Stati departe!", zone);
- BroadCast(0x8D8DFFFF,string);
- if(IsPlayerInArea(playerid, 114.21, 506.54, -1364.93, -912.91)) GangZoneFlashForAll(Gangzone[0], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 506.54, 899.25, -1364.93, -912.91)) GangZoneFlashForAll(Gangzone[1], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -1313.70, -912.91)) GangZoneFlashForAll(Gangzone[2], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -1364.93, -912.91)) GangZoneFlashForAll(Gangzone[3], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -1364.93, -912.91)) GangZoneFlashForAll(Gangzone[4], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -1364.93, -912.91)) GangZoneFlashForAll(Gangzone[5], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -1313.70, -912.91)) GangZoneFlashForAll(Gangzone[6], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 114.21, 506.54, -1821.03, -1364.93)) GangZoneFlashForAll(Gangzone[7], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 506.54, 899.25, -1821.03, -1364.93)) GangZoneFlashForAll(Gangzone[8], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -1721.90, -1313.70)) GangZoneFlashForAll(Gangzone[9], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -1821.03, -1364.93)) GangZoneFlashForAll(Gangzone[10], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -1821.03, -1364.93)) GangZoneFlashForAll(Gangzone[11], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -1821.03, -1364.93)) GangZoneFlashForAll(Gangzone[12], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -1737.65, -1313.70)) GangZoneFlashForAll(Gangzone[13], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -2131.32, -1721.90)) GangZoneFlashForAll(Gangzone[14], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 899.25, 1313.58, -2489.99, -2131.32)) GangZoneFlashForAll(Gangzone[15], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -2250.92, -1821.03)) GangZoneFlashForAll(Gangzone[16], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -2250.92, -1821.03)) GangZoneFlashForAll(Gangzone[17], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -2250.92, -1821.03)) GangZoneFlashForAll(Gangzone[18], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -2172.41, -1737.65)) GangZoneFlashForAll(Gangzone[19], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1313.58, 1727.49, -2690.47, -2250.92)) GangZoneFlashForAll(Gangzone[20], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1727.49, 2108.13, -2690.47, -2250.92)) GangZoneFlashForAll(Gangzone[21], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2108.13, 2499.38, -2690.47, -2250.92)) GangZoneFlashForAll(Gangzone[22], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2499.38, 2916.17, -2567.91, -2172.41)) GangZoneFlashForAll(Gangzone[23], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1114.47, 1478.16, 2444.49, 2901.03)) GangZoneFlashForAll(Gangzone[24], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1478.16, 1828.16, 2444.49, 2901.03)) GangZoneFlashForAll(Gangzone[25], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1828.16, 2150.16, 2444.49, 2901.03)) GangZoneFlashForAll(Gangzone[26], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2150.16, 2528.16, 2444.49, 2901.03)) GangZoneFlashForAll(Gangzone[27], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 528.16, 2878.16, 2444.49, 2901.03)) GangZoneFlashForAll(Gangzone[28], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 901.16, 1307.16, 1980.34, 2444.49)) GangZoneFlashForAll(Gangzone[29], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 1980.34, 2444.49)) GangZoneFlashForAll(Gangzone[30], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 1980.34, 2444.49)) GangZoneFlashForAll(Gangzone[31], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 1980.34, 2444.49)) GangZoneFlashForAll(Gangzone[32], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 1980.34, 2444.49)) GangZoneFlashForAll(Gangzone[33], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 901.16, 1307.16, 1528.09, 1980.34)) GangZoneFlashForAll(Gangzone[34], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 1528.09, 1980.34)) GangZoneFlashForAll(Gangzone[35], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 1528.09, 1980.34)) GangZoneFlashForAll(Gangzone[36], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 1528.09, 1980.34)) GangZoneFlashForAll(Gangzone[37], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 1528.09, 1980.34)) GangZoneFlashForAll(Gangzone[38], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 901.16, 1307.16, 1074.90, 1528.09)) GangZoneFlashForAll(Gangzone[39], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 1074.90, 1528.09)) GangZoneFlashForAll(Gangzone[40], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 1074.90, 1528.09)) GangZoneFlashForAll(Gangzone[41], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 1074.90, 1528.09)) GangZoneFlashForAll(Gangzone[42], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 1074.90, 1528.09)) GangZoneFlashForAll(Gangzone[43], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1307.16, 1677.16, 663.83, 1074.90)) GangZoneFlashForAll(Gangzone[44], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 1677.16, 2076.16, 663.83, 1074.90)) GangZoneFlashForAll(Gangzone[45], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2076.16, 2482.00, 663.83, 1074.90)) GangZoneFlashForAll(Gangzone[46], 0xFF6347AA);
- else if(IsPlayerInArea(playerid, 2482.00, 2878.16, 663.83, 1074.90)) GangZoneFlashForAll(Gangzone[47], 0xFF6347AA);
- WarStarted=1;
- WarF = side[playerid];
- WarF1 = GangInfo[ward][gFaction];
- WarZone = ward;
- for(new w = 0; w < sizeof(GangInfo); w++)
- {
- WarPoints[w] = 0;
- }
- if(side[playerid] == 5 || side[playerid] == 13 || side[playerid] == 14) WarAttack1 = 1; else WarAttack1 = 2;
- if(GangInfo[ward][gFaction] == 5 || GangInfo[ward][gFaction] == 13 || GangInfo[ward][gFaction] == 14) WarAttack2 = 1; else WarAttack2 = 2;
- if(IsAIAlliance(playerid)) War = 1; else if(IsAAAlliance(playerid)) War = 2;
- //if(GangInfo[ward][gFaction] == 5 || GangInfo[ward][gFaction] == 13 || GangInfo[ward][gFaction] == 14) War1 = 2; else if(GangInfo[ward][gFaction] == 6 || GangInfo[ward][gFaction] == 12 || GangInfo[ward][gFaction] == 15) War1 = 1;
- WarMan1 = 999;
- WarMan2 = 999;
- WarScore1 = 0;
- WarScore2 = 0;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- WarStats1[i] = 0;
- WarStats2[i] = 0;
- if(IsAIAlliance(i) || IsAAAlliance(i))
- {
- format(string, sizeof(string), "{00D7D7}War: {FFFFFF}%s din %s a declansat un razboi! Pentru a castiga razboiul, trebuie sa faceti un scor mai bun in 15 minute!", sendername, ftext);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement