PHP Code:
CMD:capture(playerid, params[])
{
if(PlayerLogged[playerid] == 0) return 1;
if(IsAGang(playerid))
{
if(PlayerInfo[playerid][pRank] < 7) return SendClientMessage(playerid,COLOR_LIGHTRED,"funkcijas pieejama no 7 ranga!");
new faction = PlayerInfo[playerid][pMember];
if(FrakCD[faction] > 0) return SendClientMessage(playerid, COLOR_GREY, "Iekarot zonu var vienreiz 40 minutes!");
if(!IsInAllowed(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Banda jau piedalas zonas partversanai!");
for(new i = 1;i<=TOTALGZ;i++){
if(ZoneOnBattle[i] == 1) return SendClientMessage(playerid, COLOR_GREY, "Kada banda jau karo!");
if(PlayerToKvadrat(playerid,GZInfo[i][gCoords][0], GZInfo[i][gCoords][1],GZInfo[i][gCoords][2],GZInfo[i][gCoords][3]) && ZoneOnBattle[i] == 0)
{
if(GZInfo[i][gFrak] == faction) return SendClientMessage(playerid, COLOR_GREY, "Jus nevarat iekarot savas bandas zonu!");
if(!IsPlayerInBandOnline(GZInfo[i][gFrak])) return SendMes(playerid,COLOR_GREY, "Nav spēlētāju no bandas \"%s\"!", GetGangName(GZInfo[i][gFrak]));
if(FrakCD[GZInfo[i][gFrak]] > 0) return SendClientMessage(playerid, COLOR_GREY, "Banda jau karoja");
format(string, 127,"[F] Jusu zonai uzbruk %s banda, jums ir 3 minutes lai sagatavotos", FracInfo[PlayerInfo[playerid][pMember]][fName]);
SendFMes(GZInfo[i][gFrak],0x006699FF,string);
format(string, 127, "[F] Ja pec laika iztecesanas jus nebusiet zona, ta paries %s bandai",FracInfo[PlayerInfo[playerid][pMember]][fName]);
SendFMes(GZInfo[i][gFrak],0x006699FF,string);
format(string,128,"[F] %s saka zonas iekarosanu %s. Jums ir 3 minutes lai sagatavotos",sendername(playerid),GetGangName(GZInfo[i][gFrak]));
SendFMes(faction,0x00D90000,string);
GangZoneFlashForAll(GZInfo[i][id],GetGZColorF(faction));
GZSafeTime[i] = 300;
FrakCD[faction] = 4200;
GZInfo[i][gNapad] = faction;
ZoneTimer[i] = 720;
ZoneOnBattle[i] = 1;
break;
}
}
}
else SendClientMessage(playerid, COLOR_GREY, YouCanNot);
return 1;
}
Whay i don't work this one ?
PHP Code:
if(ZoneOnBattle[i] == 1) return SendClientMessage(playerid, COLOR_GREY, "Kada banda jau karo!");