[Ajuda] Sistema de gzs
#4

TenteІ:
PHP код:
forward GlobalTimer();
public 
GlobalTimer()
{
    for (new 
j=0;j<MAX_TURFS;j++)
    {
        if(
gZonesData[j][ZoneInWar] == false)
        {
            for (new 
1MAX_ORGSl++)
              {
                  if(
gZonesData[j][ZoneOwner] != l)
                  {
                      new 
PlayersIn GetGangPlayersInZone(j,l);
                    if(
PlayersIn >= PLAYERS_REQUIRED && Counted[j] == false)
                    {
                        
Counted[j] = true;
                        
gZonesData[j][ZonePlayerReqMet][l] += PlayersIn;
                    }
                    if(
PlayersIn PLAYERS_REQUIRED)
                    {
                        
gZonesData[j][ZonePlayerReqMet][l] = 0;
                    }

                       if(
gZonesData[j][ZonePlayerReqMet][l] >= ZONE_CHECKS)
                    {
                        
StartWar(jgZonesData[j][ZoneOwner], l);
                                                return 
0;
                    }

                    
gZonesData[j][ZonePlayerCountEx][l] = PlayersIn;
                    
gZonesData[j][ZonePlayerCount][l] = 0;
                }
            }
        }
        
Counted[j] = false;
        if(
gZonesData[j][ZoneInWar])
        {
            if(
gZonesData[j][ZoneWarTimeLeft] > 0)
            {
                
gZonesData[j][ZoneWarTimeLeft]--;
                new 
defenders gZonesData[j][ZoneOwner];
                new 
attackers gZonesData[j][ZoneAttacker];

                new 
def_in GetGangPlayersInZone(j,defenders);
                
gZonesData[j][ZoneWarPlayers][defenders] = def_in;
                
gZonesData[j][ZoneWarPoints][defenders] += STAYING_POINTS*def_in;

                new 
atk_in GetGangPlayersInZone(j,attackers);
                
gZonesData[j][ZoneWarPlayers][attackers] = atk_in;
                
gZonesData[j][ZoneWarPoints][attackers] += STAYING_POINTS*atk_in;

            }
            else
            {
                
TurfWarEnd(jgZonesData[j][ZoneOwner], gZonesData[j][ZoneAttacker]);
            }
        }
    }

Reply


Messages In This Thread
Sistema de gzs - by BigRet - 08.05.2015, 04:11
Re: Sistema de gzs - by #Luca[S]. - 08.05.2015, 04:21
Re: Sistema de gzs - by BigRet - 08.05.2015, 04:30
Re: Sistema de gzs - by #Luca[S]. - 08.05.2015, 04:50
Re: Sistema de gzs - by GabrielDias_Invision - 08.05.2015, 15:42

Forum Jump:


Users browsing this thread: 2 Guest(s)