How to Put Countdown on Capture Zone ?Rep +
#2

PHP код:
new countText:TD[MAX_ZONES];
stock ActiveCAPZONE(playerid)
{
        if(
UnderAttack[CAPZONE] == 0)
        {
            if(!
IsPlayerInAnyVehicle(playerid))
            {
                
UnderAttack[CAPZONE] = 1;
                
timer[playerid][CAPZONE] = SetTimerEx("CAPZONETimer"25000false,"ii",CAPZONEgTeam[playerid]);
                
Captured[playerid][CAPZONE] = 0;
                
SendClientMessage(playerid0xFFFFFFFF,"| Stay in this checkpoint for 25 seconds to capture it! |");
                
SetTimerEx("Countdown"1000true"i"CAPZONE);
                
count=25;  
                
TD[CAPZONE]=TextDrawCreate(//*
                 
make textdraw
                 
*//
                
if(gTeam[playerid] ==TEAM1)
                {
                  
GangZoneFlashForAll(Zone[CAPZONE], C_GZ_COLOR);
                }
                else if(
gTeam[playerid] == TEAM2)
                {
                  
GangZoneFlashForAll(Zone[CAPZONE], T_GZ_COLOR);
                }
                else if(
gTeam[playerid] == TEAM3)
                {
                  
GangZoneFlashForAll(Zone[CAPZONE], COLOR_KRED);
                }
                
//------Message-----
                
if(tCP[CAPZONE] == TEAM1)
                {
                  
SendClientMessage(playeridC_COLOR,"This flag is controlled by TEAM");
                  
SendClientMessageToAll(STEALTH_BLUE,"*Base is under attack!");
                }
                else if(
tCP[CAPZONE] == TEAM2)
                {
//msgcapture
                
}
                else if(
tCP[CAPZONE] == TEAM3)
                {
 
//msgcapture
                
}
                else if(
tCP[CAPZONE] == NONE)
                {
                  
SendClientMessage(playeridCOLOR_WHITE,"This flag is not controlled by any team!");
                }
                
//---------loop-------//
                
for(new 0MAX_PLAYERS++)
                {
                   
IsPlayerCapturing[i][CAPZONE] = 1;
                }
            }
            else return 
CaptureZoneMessage(playerid1);
        }
        else {
         
CaptureZoneMessage(playerid2);
         }
        return 
1;

PHP код:
forward Countdown(CAPZONETEAM);
public 
Countdown(CAPZONETEAM)
{
    
count--;
    
TextDrawUpdateString(TD[CAPZONE], count);
    for(new 
i=0;i<MAX_PLAYERS;i++)
    {
         if(
gTeam[i]==TEAM)
         {
              
ShowPlayerTextdraw(playeridTD[CAPZONE]);
         }
    }

Reply


Messages In This Thread
How to Put Countdown on Capture Zone ?Rep + - by MBilal - 24.01.2015, 12:38
Re: How to Put Countdown on Capture Zone ?Rep + - by ATGOggy - 24.01.2015, 12:55

Forum Jump:


Users browsing this thread: