Код:
ZoneTextdraw_[1][playerid] = TextDrawCreate(274.000000, 339.000000, "CAPTURING...");
TextDrawBackgroundColor(ZoneTextdraw_[1][playerid], 255);
TextDrawFont(ZoneTextdraw_[1][playerid], 2);
TextDrawLetterSize(ZoneTextdraw_[1][playerid], 0.439999, 2.499999);
TextDrawColor(ZoneTextdraw_[1][playerid], -1);
TextDrawSetOutline(ZoneTextdraw_[1][playerid], 1);
TextDrawSetProportional(ZoneTextdraw_[1][playerid], 1);
TextDrawSetSelectable(ZoneTextdraw_[1][playerid], 0);
ZoneTextdraw_[2][playerid] = TextDrawCreate(274.000000, 377.000000, "~p~Zone: ~w~Bigear~n~~y~Controlled by: ~w~Asia");
TextDrawBackgroundColor(ZoneTextdraw_[2][playerid], 255);
TextDrawFont(ZoneTextdraw_[2][playerid], 2);
TextDrawLetterSize(ZoneTextdraw_[2][playerid], 0.189999, 1.299999);
TextDrawColor(ZoneTextdraw_[2][playerid], -1);
TextDrawSetOutline(ZoneTextdraw_[2][playerid], 1);
TextDrawSetProportional(ZoneTextdraw_[2][playerid], 1);
TextDrawSetSelectable(ZoneTextdraw_[2][playerid], 0);
ZoneTextdraw_[3][playerid] = TextDrawCreate(274.000000, 360.000000, "51%");
TextDrawBackgroundColor(ZoneTextdraw_[3][playerid], 255);
TextDrawFont(ZoneTextdraw_[3][playerid], 3);
TextDrawLetterSize(ZoneTextdraw_[3][playerid], 0.249999, 1.199999);
TextDrawColor(ZoneTextdraw_[3][playerid], -1);
TextDrawSetOutline(ZoneTextdraw_[3][playerid], 1);
TextDrawSetProportional(ZoneTextdraw_[3][playerid], 1);
TextDrawSetSelectable(ZoneTextdraw_[3][playerid], 0);
Код:
forward ZoneStats();
public ZoneStats()
{
foreach(Player, playerid)
{
if(IsPlayerInDynamicCP(playerid, CP[SNAKE]) && UnderAttack[SNAKE] == 1 && IsPlayerCapturing[playerid][SNAKE] == 1)
{
new c_str[100];
if(tCP[SNAKE]==ASIA)
{ c_str="Asia"; }
if(tCP[SNAKE]==AFRICA)
{ c_str="Africa"; }
if(tCP[SNAKE]==AMERICA)
{ c_str="America"; }
if(tCP[SNAKE]==EUROPE)
{ c_str="Europe"; }
if(tCP[SNAKE]==AMERICA)
{ c_str="America"; }
if(tCP[SNAKE]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][SNAKE]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d", CountVar[playerid][SNAKE]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Snake Farms~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[BAY]) && UnderAttack[BAY] == 1 && IsPlayerCapturing[playerid][BAY] == 1)
{
new c_str[100];
if(tCP[BAY]==ASIA)
{ c_str="Asia"; }
if(tCP[BAY]==AFRICA)
{ c_str="Africa"; }
if(tCP[BAY]==AMERICA)
{ c_str="America"; }
if(tCP[BAY]==EUROPE)
{ c_str="Europe"; }
if(tCP[BAY]==AMERICA)
{ c_str="America"; }
if(tCP[BAY]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][BAY]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][BAY]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Bay Side~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[BIG]) && UnderAttack[BIG] == 1 && IsPlayerCapturing[playerid][BIG] == 1)
{
new c_str[100];
if(tCP[BIG]==ASIA)
{ c_str="Asia"; }
if(tCP[BIG]==AFRICA)
{ c_str="Africa"; }
if(tCP[BIG]==AMERICA)
{ c_str="America"; }
if(tCP[BIG]==EUROPE)
{ c_str="Europe"; }
if(tCP[BIG]==AMERICA)
{ c_str="America"; }
if(tCP[BIG]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][BIG]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][BIG]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Area 51~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[ARMY]) && UnderAttack[ARMY] == 1 && IsPlayerCapturing[playerid][ARMY] == 1)
{
new c_str[100];
if(tCP[ARMY]==ASIA)
{ c_str="Asia"; }
if(tCP[ARMY]==AFRICA)
{ c_str="Africa"; }
if(tCP[ARMY]==AMERICA)
{ c_str="America"; }
if(tCP[ARMY]==EUROPE)
{ c_str="Europe"; }
if(tCP[ARMY]==AMERICA)
{ c_str="America"; }
if(tCP[ARMY]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][ARMY]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][ARMY]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Army Resturant~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[PETROL]) && UnderAttack[PETROL] == 1 && IsPlayerCapturing[playerid][PETROL] == 1)
{
new c_str[100];
if(tCP[PETROL]==ASIA)
{ c_str="Asia"; }
if(tCP[PETROL]==AFRICA)
{ c_str="Africa"; }
if(tCP[PETROL]==AMERICA)
{ c_str="America"; }
if(tCP[PETROL]==EUROPE)
{ c_str="Europe"; }
if(tCP[PETROL]==AMERICA)
{ c_str="America"; }
if(tCP[PETROL]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][PETROL]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][PETROL]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Petrol Bunk~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[OIL]) && UnderAttack[OIL] == 1 && IsPlayerCapturing[playerid][OIL] == 1)
{
new c_str[100];
if(tCP[OIL]==ASIA)
{ c_str="Asia"; }
if(tCP[OIL]==AFRICA)
{ c_str="Africa"; }
if(tCP[OIL]==AMERICA)
{ c_str="America"; }
if(tCP[OIL]==EUROPE)
{ c_str="Europe"; }
if(tCP[OIL]==AMERICA)
{ c_str="America"; }
if(tCP[OIL]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][OIL]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][OIL]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Oil Refinary~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[DESERT]) && UnderAttack[DESERT] == 1 && IsPlayerCapturing[playerid][DESERT] == 1)
{
new c_str[100];
if(tCP[DESERT]==ASIA)
{ c_str="Asia"; }
if(tCP[DESERT]==AFRICA)
{ c_str="Africa"; }
if(tCP[DESERT]==AMERICA)
{ c_str="America"; }
if(tCP[DESERT]==EUROPE)
{ c_str="Europe"; }
if(tCP[DESERT]==AMERICA)
{ c_str="America"; }
if(tCP[DESERT]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][DESERT]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][DESERT]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Gas Station~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[QUARRY]) && UnderAttack[QUARRY] == 1 && IsPlayerCapturing[playerid][QUARRY] == 1)
{
new c_str[100];
if(tCP[QUARRY]==ASIA)
{ c_str="Asia"; }
if(tCP[QUARRY]==AFRICA)
{ c_str="Africa"; }
if(tCP[QUARRY]==AMERICA)
{ c_str="America"; }
if(tCP[QUARRY]==EUROPE)
{ c_str="Europe"; }
if(tCP[QUARRY]==AMERICA)
{ c_str="America"; }
if(tCP[QUARRY]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][QUARRY]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][QUARRY]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Quarry~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[GUEST]) && UnderAttack[GUEST] == 1 && IsPlayerCapturing[playerid][GUEST] == 1)
{
new c_str[100];
if(tCP[GUEST]==ASIA)
{ c_str="Asia"; }
if(tCP[GUEST]==AFRICA)
{ c_str="Africa"; }
if(tCP[GUEST]==AMERICA)
{ c_str="America"; }
if(tCP[GUEST]==EUROPE)
{ c_str="Europe"; }
if(tCP[GUEST]==AMERICA)
{ c_str="America"; }
if(tCP[GUEST]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][GUEST]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][GUEST]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Guest House~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
if(IsPlayerInDynamicCP(playerid, CP[EAR]) && UnderAttack[EAR] == 1 && IsPlayerCapturing[playerid][EAR] == 1)
{
new c_str[100];
if(tCP[EAR]==ASIA)
{ c_str="Asia"; }
if(tCP[EAR]==AFRICA)
{ c_str="Africa"; }
if(tCP[EAR]==AMERICA)
{ c_str="America"; }
if(tCP[EAR]==EUROPE)
{ c_str="Europe"; }
if(tCP[EAR]==AMERICA)
{ c_str="America"; }
if(tCP[EAR]==TEAM_NONE)
{ c_str="N/A"; }
CountVar[playerid][EAR]--;
new ZoneString[124];
for(new x=0; x < 4; x++)
{ TextDrawShowForPlayer(playerid, ZoneTextdraw_[x][playerid]); }
format(ZoneString, sizeof(ZoneString),"%d%", CountVar[playerid][EAR]);
TextDrawSetString(ZoneTextdraw_[3][playerid], ZoneString);
format(ZoneString, sizeof(ZoneString),"~p~Zone: ~w~Bigear~n~~y~Controlled by: ~w~%s", c_str);
TextDrawSetString(ZoneTextdraw_[2][playerid], ZoneString);
}
}
return 1;
}