[Ajuda] Sistema de GangZone
#1

criei um sistema de GZ que o player fica 4minutos para dominar, porem depois que ele domina o tempo para outra gang dominar fica almentando cada vez mais, como faco p colocar um tempo Maximo neste TimeToWar?
Reply
#2

Se vocк fizesse o favor de postar o cуdigo ._.
Reply
#3

pawn Код:
if(GetPlayerZone(i) == 0 || GetPlayerZone(i) == 1 || GetPlayerZone(i) == 2 || GetPlayerZone(i) == 3)
      {
         new GZone = GetPlayerZone(i);
         if(PlayerInfo[i][Org] == BondeDaPaz || PlayerInfo[i][Org] == BondeDaHumildade || PlayerInfo[i][Org] == TorcidaJovemDoGremio || PlayerInfo[i][Org] == RacaRubroNegra || PlayerInfo[i][Org] == PM || PlayerInfo[i][Org] == GOE)
         {
           if(GzInfo[GZone][Owner] == PlayerInfo[i][Org] && GzInfo[GZone][TimeToFuture] > 0) GzInfo[GZone][TimeToFuture] ++;
           else if(GzInfo[GZone][Owner] != PlayerInfo[i][Org] && GzInfo[GZone][TimeToFuture] > 0 && PlayerInfo[i][Org] != PM && PlayerInfo[i][Org] != GOE) GzInfo[GZone][TimeToFuture] --;
           else if(GzInfo[GZone][Owner] != -1 && (PlayerInfo[i][Org] == PM || PlayerInfo[i][Org] == GOE) && GzInfo[GZone][TimeToFuture] > 0) GzInfo[GZone][TimeToFuture] --;
           if(GzInfo[GZone][TimeToFuture] == 1)
           {
             new OwnerName[256];

             if(GzInfo[GZone][Owner] == -1) OwnerName = "Nenhuma";
             else if(GzInfo[GZone][Owner] == BondeDaPaz) OwnerName = "Bonde Da Paz";
             else if(GzInfo[GZone][Owner] == BondeDaHumildade) OwnerName = "Bonde Da Humildade";
             else if(GzInfo[GZone][Owner] == TorcidaJovemDoGremio) OwnerName = "Rollin Sixties";
             else if(GzInfo[GZone][Owner] == RacaRubroNegra) OwnerName = "Los Santos Bloodz";

             new OrgName[256];
             if(PlayerInfo[i][Org] == BondeDaPaz) OrgName = "Bonde Da Paz",GzInfo[GZone][FutureOwner] = BondeDaPaz;
             else if(PlayerInfo[i][Org] == BondeDaHumildade) OrgName = "Bonde Da Humildade",GzInfo[GZone][FutureOwner] = BondeDaHumildade;
             else if(PlayerInfo[i][Org] == TorcidaJovemDoGremio) OrgName = "Rollin Sixties",GzInfo[GZone][FutureOwner] = TorcidaJovemDoGremio;
             else if(PlayerInfo[i][Org] == RacaRubroNegra) OrgName = "Los Santos Bloodz",GzInfo[GZone][FutureOwner] = RacaRubroNegra;
             else if(PlayerInfo[i][Org] == PM || PlayerInfo[i][Org] == GOE) OrgName = "Militares",GzInfo[GZone][FutureOwner] = -1;

             if(PlayerInfo[i][Org] == BondeDaPaz) GangZoneFlashForAll(GzInfo[GZone][Gz],0xFFFF00AA);
             else if(PlayerInfo[i][Org] == BondeDaHumildade) GangZoneFlashForAll(GzInfo[GZone][Gz],0xC2A2DAAA);
             else if(PlayerInfo[i][Org] == TorcidaJovemDoGremio) GangZoneFlashForAll(GzInfo[GZone][Gz],0x00CCFF90);
             else if(PlayerInfo[i][Org] == RacaRubroNegra) GangZoneFlashForAll(GzInfo[GZone][Gz],0xCC000090);
             else if(PlayerInfo[i][Org] == PM || PlayerInfo[i][Org] == GOE) GangZoneFlashForAll(GzInfo[GZone][Gz],0x66666690);

             format(string,sizeof(string),"[TLB Gang's]: Estб ocorrendo uma GangWar em %s (Gang Dominante: %s - Inimigo: %s).",GzInfo[GZone][Name],OwnerName,OrgName);
             SendClientMessageToAll(GzInfo[GZone][Color],string);

             GzInfo[GZone][WarTime] = 60;
            }
         }
       }
    }

       for(new gzs=0;gzs<MaxGzs;gzs++)
       {
          if(GzInfo[gzs][WarTime] > 0) GzInfo[gzs][WarTime] --;

          if(GzInfo[gzs][WarTime] == 0)
          {
            GzInfo[gzs][WarTime] = -1;
            GzInfo[gzs][Owner] = GzInfo[gzs][FutureOwner];

            if(GzInfo[gzs][FutureOwner] == BondeDaPaz) GzInfo[gzs][Color]=HexToInt("0xFFFF00AA");
            else if(GzInfo[gzs][FutureOwner] == BondeDaHumildade) GzInfo[gzs][Color]=HexToInt("0xC2A2DAAA");
            else if(GzInfo[gzs][FutureOwner] == TorcidaJovemDoGremio) GzInfo[gzs][Color]=HexToInt("0x00CCFF90");
            else if(GzInfo[gzs][FutureOwner] == RacaRubroNegra) GzInfo[gzs][Color]=HexToInt("0xCC000090");
            else if(GzInfo[gzs][FutureOwner] == -1) GzInfo[gzs][Color]=HexToInt("0x66666690");

            GzInfo[gzs][TimeToFuture] = 300;

            GangZoneStopFlashForAll(GzInfo[gzs][Gz]);
            GangZoneShowForAll(GzInfo[gzs][Gz],GzInfo[gzs][Color]);

            new OwnerName[256];

             if(GzInfo[gzs][Owner] == -1) OwnerName = "Nenhuma";
             else if(GzInfo[gzs][Owner] == BondeDaPaz) OwnerName = "Bonde DaPaz";
             else if(GzInfo[gzs][Owner] == BondeDaHumildade) OwnerName = "BondeDaHumildade";
             else if(GzInfo[gzs][Owner] == TorcidaJovemDoGremio) OwnerName = "Rollin Sixties";
             else if(GzInfo[gzs][Owner] == RacaRubroNegra) OwnerName = "Los Santos Bloodz";

            format(string,sizeof(string),"[TLB Gang's]: %s conquistou %s.",OwnerName,GzInfo[gzs][Name]);
            SendClientMessageToAll(GzInfo[gzs][Color],string);
          }
       }

       for(new gzs=0;gzs<MaxGzs;gzs++)
       {
          if(GzInfo[gzs][PagamentoDelay] > 0) GzInfo[gzs][PagamentoDelay] --;
          else if(GzInfo[gzs][PagamentoDelay] == 0)
          {
             GzInfo[gzs][PagamentoDelay] = GzInfo[gzs][Lucro]*3/2;
             for(new ig=0;ig<MAX_PLAYERS;ig++)
             {
                if(PlayerInfo[ig][Org] == GzInfo[gzs][Owner])
                {
                  if(PlayerInfo[ig][Cargo] < 3)
                  {
                     format(string,sizeof(string),"[TLB Gang's]: Vocк recebeu $%d de lucro de %s.",GzInfo[gzs][Lucro]/2,GzInfo[gzs][Name]);
                     SendClientMessage(ig,BroadCastColor2,string);
                     GivePlayerMoneyEx(ig,GzInfo[gzs][Lucro]/2);
                  }
                  else
                  {
                    format(string,sizeof(string),"[TLB Gang's]: Vocк recebeu $%d de lucro de %s.",GzInfo[gzs][Lucro],GzInfo[gzs][Name]);
                    SendClientMessage(ig,BroadCastColor2,string);
                    GivePlayerMoneyEx(ig,GzInfo[gzs][Lucro]);
                  }
                }
             }
           }
        }
Reply
#4

Por favor use a tag: [pawn] [*/pawn] sу que sem a estrela (*)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)