Help with TDM And round
#9

Anyway, i've tryed with no "i" and putting a for loop in the public.. I've replaced all the TimerEx with some simple Timer..

Код:
//FORWARD
forward StartCW();
forward FineCW();
forward PreparingRound();
forward StartRound();
forward EndRound();
forward Respawn();
Here it is:

pawn Код:
public PreparingRound()
{

    PB = 0;
    PO = 0;
    new string[256];
    if(round < MaxRounds)
    {
        round++;

        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                //SETTING TEAM POSITION
                if(team[i] == DMB)
                {
                    if(round == 1) SetPlayerPos(i,241.2442,1817.7256,17.6406);
                    if(round == 2) SetPlayerPos(i,1216.0854,2799.9041,10.8203);
                    if(round == 3) SetPlayerPos(i,2081.3088,2414.8938,74.5786);
                    if(round == 4) SetPlayerPos(i,1714.7217,-1911.3442,13.5666);
                    if(round == 5) SetPlayerPos(i,2704.1973,906.5118,10.5942);
                    if(round == 6) SetPlayerPos(i,1409.3176,2123.4229,12.0156);
                    if(round == 7) SetPlayerPos(i,2617.5596,2719.1956,36.5386);
                    if(round == 8) SetPlayerPos(i,815.3414,-1102.5481,25.7898);
                    if(round == 9) SetPlayerPos(i,2777.4817,-2379.0042,16.2244);
                    if(round == 10) SetPlayerPos(i,1614.3787,950.1139,10.6892);
                    if(round == 11) SetPlayerPos(i,-583.9959,-82.5619,64.9246);
                    if(round == 12) SetPlayerPos(i,-28.2044,92.9659,3.1172);
                    if(round == 13) SetPlayerPos(i,-459.9643,2223.8311,43.5393);
                    if(round == 14) SetPlayerPos(i,-1304.7231,2557.1741,86.9873);
                    if(round == 15) SetPlayerPos(i,-2119.7852,251.3441,35.7451);
                }
                if(team[i] == DMO)
                {
                    if(round == 1) SetPlayerPos(i,128.2351,1921.3809,19.1034);
                    if(round == 2) SetPlayerPos(i,1401.8285,2774.6309,10.8203);
                    if(round == 3) SetPlayerPos(i,2188.2720,2416.8738,73.0339);
                    if(round == 4) SetPlayerPos(i,1763.0464,-1920.6128,13.5742);
                    if(round == 5) SetPlayerPos(i,2612.3774,791.5310,10.9545);
                    if(round == 6) SetPlayerPos(i,1330.5277,2210.1230,12.0156);
                    if(round == 7) SetPlayerPos(i,2746.3167,2782.1453,10.8203);
                    if(round == 8) SetPlayerPos(i,936.6701,-1103.1526,24.3156);
                    if(round == 9) SetPlayerPos(i,2772.5820,-2524.0115,16.2244);
                    if(round == 10) SetPlayerPos(i,1743.1304,1118.2189,10.6806);
                    if(round == 11) SetPlayerPos(i,-467.6872,-175.6100,78.2176);
                    if(round == 12) SetPlayerPos(i,-100.3243,-61.4496,3.1172);
                    if(round == 13) SetPlayerPos(i,-345.8914,2241.3804,42.4844);
                    if(round == 14) SetPlayerPos(i,-1311.6449,2485.2610,87.1569);
                    if(round == 15) SetPlayerPos(i,-2038.5171,250.5813,35.1514);
                }
                    //FREZZING & PREPARING TO START
                if(team[i] == DMO || team[i] == DMB)
                {
                    TogglePlayerControllable(i,0);
                    format(string, sizeof(string), "~r~ ROUND %d ~w~ STARTING", round);
                    GameTextForPlayer(i, string, 1500, 0);
                }

          SetTimer("StartRound", 3000, false);
            }
        }
    }
    else
    {
    FineCW();
    }
    return 1;
}
public StartRound()
{

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(team[i] == DMB || team[i] == DMO)
            {
                TogglePlayerControllable(i,1);
          GameTextForPlayer(i,"~r~ FIGHT", 2500, 0);
          endround = SetTimer("EndRound", RoundTime*60000, false);
          GivePlayerWeapon(i, 24, 5000);
          if(GunSet[i] == M4) GivePlayerWeapon(i, 31, 5000);
          if(GunSet[i] == SNIPER) GivePlayerWeapon(i, 34, 5000);
          if(GunSet[i] == AK47) GivePlayerWeapon(i, 30, 5000);
          SetPlayerHealth(i, 100);
       }
     }
  }
    return 1;
}

public EndRound()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(team[i] == DMB || team[i] == DMO)
            {
            new string[256];
            GameTextForPlayer(i,"~r~ FINE ROUND", 2000, 1);
            format(string, sizeof(string), "~b~ TEAM BLU: %d ~y~ TEAM ORANGE: %d", PB, PO);
            GameTextForPlayer(i, string, 2500, 0);

            if(PB > PO) {
                GameTextForPlayer(i, "~b~ TEAM BLU VINCE IL ROUND", 2500, 0);
                RB++;
            }

            else if(PB < PO) {
                GameTextForPlayer(i, "~b~ TEAM ORANGE VINCE IL ROUND", 2500, 0);
                RO++;
            }

            else if(PB == PO) {
                GameTextForPlayer(i, "~w~ PARITA'", 2500, 0);
            }

            SetTimer("PreparingRound", 10000, false);
            }
        }
    }
    return 1;
}


public FineCW()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
          if(team[i] == DMB || team[i] == DMO)
            {
                SetTimer("Respawn", 10000, false);
                new string[256];
                if(RB > RO) {
                    format(string, sizeof(string), "~b~ TEAM BLU: %d ~y~ TEAM ORANGE~n~ ~b~ TEAM BLU VINCE LA CW", RB, RO);
                    GameTextForPlayer(i, string, 2500, 0);
                }

                else if(RB < RO) {
                    format(string, sizeof(string), "~b~ TEAM BLU: %d ~y~ TEAM ORANGE~n~ ~y~ TEAM ORANGE VINCE LA CW", RB, RO);
                    GameTextForPlayer(i, string, 2500, 0);
                }

                else if(RB == RO) {
                    format(string, sizeof(string), "~b~ TEAM BLU: %d ~y~ TEAM ORANGE: %d ~n~ ~w~ PARITA'", RB, RO);
                    GameTextForPlayer(i, string, 2500, 0);
                }
            }
        }
    }
    KillTimer(endround);
    RB = 0;
    RO = 0;
    PB = 0;
    PO = 0;
    round = 0;
   
    return 1;
}

public Respawn()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
          if(team[i] == DMB || team[i] == DMO)
            {
                SetPlayerHealth(i, 0);
                ForceClassSelection(i);
            }
        }
    }
}
But i've the same problems
Reply


Messages In This Thread
Help with TDM And round - by [SsC11]MAVERIK - 04.06.2010, 10:42
Re: Help with TDM And round - by Naxix - 04.06.2010, 11:35
Re: Help with TDM And round - by [SsC11]MAVERIK - 05.06.2010, 12:09
Re: Help with TDM And round - by Naxix - 05.06.2010, 12:10
Re: Help with TDM And round - by [SsC11]MAVERIK - 05.06.2010, 12:52
Re: Help with TDM And round - by [SsC11]MAVERIK - 05.06.2010, 16:13
Re: Help with TDM And round - by LTomi - 05.06.2010, 17:46
Re: Help with TDM And round - by [SsC11]MAVERIK - 05.06.2010, 18:39
Re: Help with TDM And round - by [SsC11]MAVERIK - 06.06.2010, 06:37

Forum Jump:


Users browsing this thread: 2 Guest(s)