...
Код:
stock ActiveRefinery(playerid)
{
if(UnderAttack[Refinery] == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
UnderAttack[Refinery] = 1;
timer[playerid][Refinery] = SetTimerEx("RefineryTimer", 25000, false,"i",playerid);
Captured[playerid][Refinery] = 0;
SendClientMessage(playerid, 0xFFFFFFFF,"| Stay in this checkpoint for 25 seconds to capture it! |");
if(gTeam[playerid] == TEAM_Internationalforces)
{
GangZoneFlashForAll(Zone[Refinery], TEAM_Internationalforces_COLOUR);
}
else if(gTeam[playerid] == TEAM_Daesh)
{
GangZoneFlashForAll(Zone[Refinery], TEAM_Daesh_COLOUR);
}
//------Message-----
if(tCP[Refinery] == TEAM_Internationalforces)
{
SendClientMessage(playerid, COLOR_WHITE,"This flag is controlled by Internationalforces!");
SendClientMessageToAll(COLOR_GREEN,"*Capture Zone is under attack!");
}
else if(tCP[Refinery] == TEAM_Daesh)
{
SendClientMessage(playerid, COLOR_WHITE,"This flag is controlled by Daesh!");
SendClientMessageToAll(COLOR_GREEN,"*Capture Zone is under attack!");
}
else if(tCP[Refinery] == NONE)
{
SendClientMessage(playerid, COLOR_WHITE,"This flag is not controlled by any team!");
}
//---------loop-------//
for(new i = 0; i < MAX_PLAYERS; i ++)
{
IsPlayerCapturing[i][Refinery] = 1;
}
}
else return CaptureZoneMessage(playerid, 1);
}
else return CaptureZoneMessage(playerid, 2);
return 1;
}