a a small problem :D
#5

Wait wait, why do you have a variable for each player and each team? It seems that what you're trying to do would be much better done like so.

pawn Код:
enum pTeams
{
TEAM_POLICE,
TEAM_SWAT,
TEAM_ARMY,
TEAM_AMCSI,
TEAM_COLUMBIANO,
TEAM_KINA,
TEAM_TERRO
};
new teamScore[pTeams];
OnPlayerDeath

pawn Код:
if(gTeam[playerid] == TEAM_POLICE)
{
    teamScore[TEAM_POLICE]++;
    if(teamScore[TEAM_POLICE] >= 50)
    {
        GameTextForAll("~w~Corleones Won",5000,0);
        SetTimer("EndGM", 10000,0);
    }
}
//and so on...
No need for a loop, there's no reason that you'd want to store a seperate team score for each player since the team score is for everyone in that team.

On another note is there any specific reason you're using a static type variable for gTeam? I recommend a normal one.
Reply


Messages In This Thread
a a small problem :D - by LZLo - 10.08.2010, 19:31
Re: a a small problem :D - by JaTochNietDan - 10.08.2010, 19:32
Re: a a small problem :D - by LZLo - 10.08.2010, 19:36
Re: a a small problem :D - by LZLo - 10.08.2010, 19:38
Re: a a small problem :D - by JaTochNietDan - 10.08.2010, 19:41
Re: a a small problem :D - by LZLo - 10.08.2010, 19:50

Forum Jump:


Users browsing this thread: 2 Guest(s)