KillAll problem....
#5

Too many returns

pawn Код:
public TeamsKills()
{
    if(TeamREDKills >= 2 && TeamREDKills > TeamBLUEKills)
    {
        GameTextForAll("~y~TEAM ~r~RED ~g~WON!!!~n~~y~Switching Map...",5000,3);
        SetTimer("MapChange",5000,false);
        TeamBLUEKills = 0;
        TeamREDKills = 0;
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            TogglePlayerControllable(i,false);
        }
    }
    else if(TeamBLUEKills >= 2 && TeamBLUEKills > TeamREDKills)
    {
        GameTextForAll("~y~TEAM ~b~BLUE ~g~WON!!!~n~~y~Switching Map...",5000,3);
        SetTimer("MapChange",5000,false);
        TeamBLUEKills = 0;
        TeamREDKills = 0;
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            TogglePlayerControllable(i,false);
        }
    }
    return 1;
}

forward MapChange();
public MapChange()
{
    new rand = random(3);
    switch (rand)
    {
        case 0:MArea69 = 1,MBuildyard = 0,MHarbour = 0,SendClientMessageToAll(COLOR_ORANGE,"Map Has Changed to Area69...");
        case 1:MBuildyard = 1,MArea69 = 0,MHarbour = 0,SendClientMessageToAll(COLOR_ORANGE,"Map Has Changed to BuildYard...");
        case 2:MHarbour = 1,MArea69 = 0,MBuildyard = 0,SendClientMessageToAll(COLOR_ORANGE,"Map Has Changed to Harbour...");
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SetPlayerScore(i,0);
        SetPlayerHealth(i,0.0);
    }
}
Reply


Messages In This Thread
KillAll problem.... - by [MNC]Azz - 29.11.2010, 16:11
Re: KillAll problem.... - by NewYorkRP - 29.11.2010, 17:04
Re: KillAll problem.... - by [MNC]Azz - 29.11.2010, 17:24
Re: KillAll problem.... - by [MNC]Azz - 29.11.2010, 18:22
Re: KillAll problem.... - by MadeMan - 29.11.2010, 18:33
Re: KillAll problem.... - by SuperS82 - 29.11.2010, 18:39
Re: KillAll problem.... - by [MNC]Azz - 01.12.2010, 11:09

Forum Jump:


Users browsing this thread: 1 Guest(s)