Vesker20012
Умник
PHP:
stock GzCheck()
{
new string[256];
for(new i = 1; i <= TotalGz; i++)
{
if(GZSafeTime[i] > 0)
{
GZSafeTime[i]--;
foreach(Player,x)
{
if(PlayerInfo[x][tMember] == GZInfo[i][gNapad] || PlayerInfo[x][tMember] == GZInfo[i][gFrak])
{
if(GetPVarInt(x,"GzOn") == 0)
{
new BANDAA[128],BANDAB[128];
PlayerTextDrawShow(x, BandaCapt1a[x]);
PlayerTextDrawShow(x, BandaCapt2a[x]);
PlayerTextDrawShow(x, ScoreCapt1a[x]);
PlayerTextDrawShow(x, ScoreCapt2a[x]);
PlayerTextDrawShow(x, ScoreCaptTire[x]);
PlayerTextDrawShow(x, CaptTime[x]);
PlayerTextDrawShow(x, ScoreCapt[x]);
PlayerTextDrawShow(x, Textdraw4[x]);
format(BANDAA, 128, "~y~%s", GetGangName(GZInfo[i][gNapad]));
PlayerTextDrawSetString(x,BandaCapt1a[x], BANDAA);
format(BANDAB, 128, "~y~%s", GetGangName(GZInfo[i][gFrak]));
PlayerTextDrawSetString(x,BandaCapt2a[x], BANDAB);
format(BANDAA, 64, "~r~0");
PlayerTextDrawSetString(x,ScoreCapt1a[x], BANDAA);
format(BANDAB, 64, "~r~0");
PlayerTextDrawSetString(x,ScoreCapt2a[x], BANDAB);
SetPVarInt(x,"GzOn",1);
}
new stringText[30];
convert(GZSafeTime[i], stringText);
PlayerTextDrawSetString(x,CaptTime[x], stringText);
}
}
}
if(ZoneOnBattle[i] == 1 && GZSafeTime[i] == 0)
{
if(GangInfo[GZInfo[i][gNapad]][score] == GangInfo[GZInfo[i][gFrak]][score])
{
format(string, 90, "[F] Счет захвата территории равен. Ничья");
SendFamilyMessage(GZInfo[i][gFrak],COLOR_LIGHTRED, string);
SendFamilyMessage(GZInfo[i][gNapad],COLOR_LIGHTRED, string);
ZoneOnBattle[i] = 0;
IsCapture=0;
CaptureEnd(GZInfo[i][gNapad], GZInfo[i][gFrak]);
GangZoneStopFlashForAll(GZInfo[i][gID]);
GangInfo[GZInfo[i][gNapad]][captureid] = 0;
GangInfo[GZInfo[i][gNapad]][capture] = 0;
GangInfo[GZInfo[i][gNapad]][score] = 0;
GangInfo[GZInfo[i][gFrak]][captureid] = 0;
GangInfo[GZInfo[i][gFrak]][capture] = 0;
GangInfo[GZInfo[i][gFrak]][score] = 0;
GangInfo[GZInfo[i][gNapad]][gangnumber] = 0;
GangInfo[GZInfo[i][gFrak]][gangnumber] = 0;
Timer[7] = 0;
}
else if(GangInfo[GZInfo[i][gNapad]][score] > GangInfo[GZInfo[i][gFrak]][score])
{
new zx,zl;
zx = GZInfo[i][gNapad];
zl = i;
format(string,90,"[F] Банда %s выйгрывает захват зоны",GetGangName(zx));
SendFamilyMessage(GZInfo[i][gFrak],COLOR_LIGHTRED, string);
SendFamilyMessage(GZInfo[i][gNapad],COLOR_LIGHTRED, string);
//for(new ads = 8; ads <= 12;ads++) SendFamilyMessage(ads, COLOR_LIGHTRED,string);
ZoneOnBattle[zl] =0;
CaptureEnd(GZInfo[zl][gNapad], GZInfo[zl][gFrak]);
GangInfo[GZInfo[zl][gNapad]][captureid] = 0;
GangInfo[GZInfo[zl][gNapad]][capture] = 0;
GangInfo[GZInfo[zl][gNapad]][score] = 0;
GangInfo[GZInfo[zl][gFrak]][captureid] = 0;
GangInfo[GZInfo[zl][gFrak]][capture] = 0;
GangInfo[GZInfo[zl][gFrak]][score] = 0;
GangInfo[GZInfo[i][gNapad]][gangnumber] = 0;
GangInfo[GZInfo[i][gFrak]][gangnumber] = 0;
GZInfo[zl][gFrak] = zx;
GZInfo[zl][gNapad] = 0;
IsCapture=0;
GangZoneStopFlashForAll(GZInfo[zl][gID]);
GangZoneHideForAll(GZInfo[zl][gID]);
GangZoneShowForAll(GZInfo[zl][gID],GetGangZoneColor(zl));
SaveGZ(zl);
Timer[7] = 0;
}
else if(GangInfo[GZInfo[i][gNapad]][score] < GangInfo[GZInfo[i][gFrak]][score])
{
new zx,zl;
zx = GZInfo[i][gFrak];
zl = i;
format(string,90,"[F] Банда %s выйгрывает захват зоны",GetGangName(zx));
SendFamilyMessage(GZInfo[i][gFrak],COLOR_LIGHTRED, string);
format(string,90,"[F] Банда %s выйграла, вы проиграли захват зоны",GetGangName(zx));
SendFamilyMessage(GZInfo[i][gNapad],COLOR_LIGHTRED, string);
ZoneOnBattle[zl] =0;
CaptureEnd(GZInfo[zl][gNapad], GZInfo[zl][gFrak]);
GangInfo[GZInfo[zl][gNapad]][captureid] = 0;
GangInfo[GZInfo[zl][gNapad]][capture] = 0;
GangInfo[GZInfo[zl][gNapad]][score] = 0;
GangInfo[GZInfo[zl][gFrak]][captureid] = 0;
GangInfo[GZInfo[zl][gFrak]][capture] = 0;
GangInfo[GZInfo[zl][gFrak]][score] = 0;
GangInfo[GZInfo[i][gNapad]][gangnumber] = 0;
GangInfo[GZInfo[i][gFrak]][gangnumber] = 0;
IsCapture=0;
GZInfo[zl][gFrak] = zx;
GZInfo[zl][gNapad] = 0;
GangZoneStopFlashForAll(GZInfo[zl][gID]);
GangZoneHideForAll(GZInfo[zl][gID]);
GangZoneShowForAll(GZInfo[zl][gID],GetGangZoneColor(zl));
SaveGZ(zl);
Timer[7] = 0;
}
}
}
}
