10.08.2010, 19:41
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.
OnPlayerDeath
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.
pawn Код:
enum pTeams
{
TEAM_POLICE,
TEAM_SWAT,
TEAM_ARMY,
TEAM_AMCSI,
TEAM_COLUMBIANO,
TEAM_KINA,
TEAM_TERRO
};
new teamScore[pTeams];
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...
On another note is there any specific reason you're using a static type variable for gTeam? I recommend a normal one.