I've this system scripted.
When player type /leftakeover.
It will show how many gangzones left to take over.
When there is 1 captured gangzones. It will always return like this:
there is 18 gangzones.
When there is 1 captured zones it will return 16.
Instead of 17.
It means it 2x subtract from 18 = 16.
For ballas we have 5 gangzone (same with grove street when main zone is not counted)
teamcount (player's gang's gangzone) is being subtracted to all zone.
subtract 1. So that the mainzone will not be counted.
pawn Code:
stock SetGangZone(playerid)
{
new string[128];
switch(GetPlayerTeam(playerid))
{
case TEAM_GROVE: Team = "Grove Street Member";
case TEAM_BALLAS: Team = "Ballas Member";
case TEAM_LA: Team = "Los Aztecas Member";
case TEAM_LV: Team = "Los Santos Vagos Member";
case TEAM_MAFIA: Team = "Mafia Member";
case TEAM_COPS: Team = "Cop Member";
case TEAM_BIKERS: Team = "Street Biker Member";
case TEAM_GIRLS: Team = "Girl Squad Member";
}
switch(GetPlayerTeam(playerid))
{
case TEAM_GROVE: countzone[0]++;
case TEAM_LV: countzone[1]++;
case TEAM_BALLAS: countzone[2]++;
case TEAM_LA: countzone[3]++;
case TEAM_MAFIA: countzone[4]++;
case TEAM_COPS: countzone[5]++;
case TEAM_BIKERS: countzone[6]++;
case TEAM_GIRLS: countzone[7]++;
}
if(zDefine[playerid] == 0)
{
switch(tCheck[0])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[0], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[0]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[0] = GetPlayerTeam(playerid);
UnderAttack[0] = 0;
KillTimer(timer[playerid][0]);
}
else if(zDefine[playerid] == 1)
{
switch(tCheck[1])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[1], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[1]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[1] = GetPlayerTeam(playerid);
UnderAttack[1] = 0;
KillTimer(timer[playerid][1]);
}
else if(zDefine[playerid] == 2)
{
switch(tCheck[2])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[2], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[2]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[2] = GetPlayerTeam(playerid);
UnderAttack[2] = 0;
KillTimer(timer[playerid][2]);
}
else if(zDefine[playerid] == 3)
{
switch(tCheck[3])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[3], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[3]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[3] = GetPlayerTeam(playerid);
UnderAttack[3] = 0;
KillTimer(timer[playerid][3]);
}
else if(zDefine[playerid] == 4)
{
switch(tCheck[4])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[4], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[4]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[4] = GetPlayerTeam(playerid);
UnderAttack[4] = 0;
KillTimer(timer[playerid][4]);
}
else if(zDefine[playerid] == 5)
{
switch(tCheck[5])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[5], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[5]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[5] = GetPlayerTeam(playerid);
UnderAttack[5] = 0;
KillTimer(timer[playerid][5]);
}
else if(zDefine[playerid] == 6)
{
switch(tCheck[6])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[6], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[6]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[6] = GetPlayerTeam(playerid);
UnderAttack[6] = 0;
KillTimer(timer[playerid][6]);
}
else if(zDefine[playerid] == 7)
{
switch(tCheck[7])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[7], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[7]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[7] = GetPlayerTeam(playerid);
UnderAttack[7] = 0;
KillTimer(timer[playerid][7]);
}
else if(zDefine[playerid] == 8)
{
switch(tCheck[8])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[8], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[8]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[8] = GetPlayerTeam(playerid);
UnderAttack[8] = 0;
KillTimer(timer[playerid][8]);
}
else if(zDefine[playerid] == 9)
{
switch(tCheck[9])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[9], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[9]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[9] = GetPlayerTeam(playerid);
UnderAttack[9] = 0;
KillTimer(timer[playerid][9]);
}
else if(zDefine[playerid] == 10)
{
switch(tCheck[10])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[10], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[10]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[10] = GetPlayerTeam(playerid);
UnderAttack[10] = 0;
KillTimer(timer[playerid][10]);
}
else if(zDefine[playerid] == 11)
{
switch(tCheck[11])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[11], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[11]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[11] = GetPlayerTeam(playerid);
UnderAttack[11] = 0;
KillTimer(timer[playerid][11]);
}
else if(zDefine[playerid] == 12)
{
switch(tCheck[12])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[12], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[12]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[12] = GetPlayerTeam(playerid);
UnderAttack[12] = 0;
KillTimer(timer[playerid][12]);
}
else if(zDefine[playerid] == 13)
{
switch(tCheck[13])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[13], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[13]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[13] = GetPlayerTeam(playerid);
UnderAttack[13] = 0;
KillTimer(timer[playerid][13]);
}
else if(zDefine[playerid] == 14)
{
switch(tCheck[14])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[14], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[14]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[14] = GetPlayerTeam(playerid);
UnderAttack[14] = 0;
KillTimer(timer[playerid][14]);
}
else if(zDefine[playerid] == 15)
{
switch(tCheck[15])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[15], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[15]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[15] = GetPlayerTeam(playerid);
UnderAttack[15] = 0;
KillTimer(timer[playerid][15]);
}
else if(zDefine[playerid] == 16)
{
switch(tCheck[16])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[16], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[16]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[16] = GetPlayerTeam(playerid);
UnderAttack[16] = 0;
KillTimer(timer[playerid][16]);
}
else if(zDefine[playerid] == 17)
{
switch(tCheck[17])
{
case TEAM_GROVE:
{
format(string, sizeof(string), "%s %s has captured Grove Street's Gang Zone", Team, GetName(playerid));
countzone[0]--;
}
case TEAM_BALLAS:
{
format(string, sizeof(string), "%s %s has captured Ballas' Gang Zone", Team, GetName(playerid));
countzone[2]--;
}
case TEAM_LA:
{
format(string, sizeof(string), "%s %s has captured Los Aztecas's Gang Zone", Team, GetName(playerid));
countzone[3]--;
}
case TEAM_LV:
{
format(string, sizeof(string), "%s %s has captured Los Santos Vagos' Gang Zone", Team, GetName(playerid));
countzone[1]--;
}
case TEAM_MAFIA:
{
format(string, sizeof(string), "%s %s has captured Mafia's Gang Zone", Team, GetName(playerid));
countzone[4]--;
}
case TEAM_COPS:
{
format(string, sizeof(string), "%s %s has captured Cops' Gang Zone", Team, GetName(playerid));
countzone[5]--;
}
case TEAM_BIKERS:
{
format(string, sizeof(string), "%s %s has captured Street Bikers' Gang Zone", Team, GetName(playerid));
countzone[6]--;
}
case TEAM_GIRLS:
{
format(string, sizeof(string), "%s %s has captured Girl Squad's Gang Zone", Team, GetName(playerid));
countzone[7]--;
}
}
GangZoneShowForAll(Zone[17], GetPlayerColor(playerid));
GangZoneStopFlashForAll(Zone[17]);
SendClientMessageToAll(COLOR_RED, string);
tCheck[17] = GetPlayerTeam(playerid);
UnderAttack[17] = 0;
KillTimer(timer[playerid][16]);
}
return 1;
}
Your subtracting the teamcount when you should be adding the teamcount. On another note I don't like how this system is set up at all your going to have problems because your fundamental system design is flawed. You should have an enum for all your gangzone data for example.
That is looking better now you can add and remove zones with one line of code to count the zones of a team...
I've to add the teamcount to countzone 7 (teamcount is the 0).
But if i do that it will return 18. (18 capturable zones).
Read my update you'll see why your system is badly flawed and how to make it a lot easier to script.