29.07.2015, 02:22
please help:
http://imgur.com/4FjUaxx
Код:
if(strcmp(cmd, "/rivalwar", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) { if(PlayerInfo[playerid][pRank] >= 5) { if(IsPlayerInArea(playerid,TurfInfo[1][MinX],TurfInfo[1][MinY],TurfInfo[1][MaxX],TurfInfo[1][MaxY])) { if(TurfInfo[1][CodTime] <= 0) { if(TurfInWar[1] == 0) { new cYakuza; new cLaCosaNostra; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 6) { cYakuza++; } if(PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 5) { cLaCosaNostra++; } } } if(cYakuza >= 2 && cLaCosaNostra >= 2) { if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) { if(TurfInfo[1][Owner] == 6) { StartLYWar(5, 6, 1); ContorizationTimerLY = SetTimer("ContorizationLY", 3500, true); new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~Rival-Wars Turf ~w~against the ~r~Yakuza"); TextDrawFont(TDatack, 0); TextDrawSetShadow(TDatack, 0); TextDrawSetOutline(TDatack, 1); TextDrawColor(TDatack, 0xDFDFDFFF); TimeTextForPlayer(playerid, TDatack, 10000); } else { SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood"); } } if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) { if(TurfInfo[1][Owner] == 5) { StartLYWar(6, 5, 1); ContorizationTimerLY = SetTimer("ContorizationLY", 3500, true); new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~Rival-Wars Turf ~w~against the ~r~La Cosa Nostra"); TextDrawFont(TDatack, 0); TextDrawSetShadow(TDatack, 0); TextDrawSetOutline(TDatack, 1); TextDrawColor(TDatack, 0xDFDFDFFF); TimeTextForPlayer(playerid, TDatack, 10000); } else { SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood"); } } } if(!(cYakuza >= 2 && cLaCosaNostra >= 2)) { SendClientMessage(playerid,COLOR_WHITE, "There must be at least 2 members in each factions"); } } else { SendClientMessage(playerid, COLOR_WHITE, "Can't start 2 rival wars at the sime time"); } } else { SendClientMessage(playerid, COLOR_WHITE, "You must wait 3 hours between Rival-Wars"); } } else { SendClientMessage(playerid, COLOR_WHITE, "You ar not in a rival hood"); } } else { SendClientMessage(playerid,COLOR_WHITE, "You need at least Rank 5 for this action"); } } else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) { if(PlayerInfo[playerid][pRank] >= 5) { if(IsPlayerInArea(playerid,TurfInfo[2][MinX],TurfInfo[2][MinY],TurfInfo[2][MaxX],TurfInfo[2][MaxY])) { if(TurfInfo[2][CodTime] <= 0) { if(TurfInWar[2] == 0) { new cCrips; new cBloods; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 12) { cCrips++; } if(PlayerInfo[i][pMember] == 13 || PlayerInfo[i][pLeader] == 13) { cBloods++; } } } if(cCrips >= 2 && cBloods >= 2) { if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) { if(TurfInfo[2][Owner] == 13) { StartCBWar(12, 13, 2); ContorizationTimerCB = SetTimer("ContorizationCB", 3500, true); new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~ Rival-Wars Turf Turf. ~w~against the ~r~Crips Gang"); TextDrawFont(TDatack, 0); TextDrawSetShadow(TDatack, 0); TextDrawSetOutline(TDatack, 1); TextDrawColor(TDatack, 0xDFDFDFFF); TimeTextForPlayer(playerid, TDatack, 10000); } else { SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood"); } } if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) { if(TurfInfo[2][Owner] == 12) { StartCBWar(13, 12, 2); ContorizationTimerCB = SetTimer("ContorizationCB", 3500, true); new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~ Rival-Wars Turf Turf. ~w~against the ~r~Bloods Gang"); TextDrawFont(TDatack, 0); TextDrawSetShadow(TDatack, 0); TextDrawSetOutline(TDatack, 1); TextDrawColor(TDatack, 0xDFDFDFFF); TimeTextForPlayer(playerid, TDatack, 10000); } else { SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood"); } } } if(!(cCrips >= 2 && cBloods >= 2)) { SendClientMessage(playerid,COLOR_WHITE, "There must be at least 2 members in each factions"); } } else { SendClientMessage(playerid, COLOR_WHITE, "Can't start 2 rival wars at the sime time"); } } else { SendClientMessage(playerid, COLOR_WHITE, "You must wait 3 hours between Rival-Wars"); } } else { SendClientMessage(playerid, COLOR_WHITE, "You ar not in a rival hood"); } } else { SendClientMessage(playerid, COLOR_WHITE, "You need at least Rank 5 for this action"); } }