[HELP] for(new i; i<GetMaxPlayers(); i++)...
#1

Hello!

I am creating a team deathmatch mode, but i have problems. The players start with 5 score and if they dead they get -1, if the kill somebody they get +1 score. If all the players in the team has 0 point, the team loose, if all the players in the team has 10 score, the team wins.

Код:
for(new i; i<GetMaxPlayers(); i++)
{
if(gTeam[i]==TEAM_ARMY)
{
if(GetPlayerScore(i)==0)
{
SendClientMessageToAll(COLOR_BLUE,"Las Venturas Army has lost the battle.");
}
}
}
It doesnt works, because if it ARMY team are 2 players for example id 0 and id 1, if id 0 has got score 0 and id 1 has got score 5, they loose the battle.

How to make this that not only id 0, but all players in the team must have score 0??
Reply


Messages In This Thread
[HELP] for(new i; i<GetMaxPlayers(); i++)... - by sushihusi - 29.11.2010, 13:56
Re: [HELP] for(new i; i<GetMaxPlayers(); i++)... - by MadeMan - 29.11.2010, 14:19
Re: [HELP] for(new i; i<GetMaxPlayers(); i++)... - by sushihusi - 29.11.2010, 14:55
Re: [HELP] for(new i; i<GetMaxPlayers(); i++)... - by MadeMan - 29.11.2010, 15:03

Forum Jump:


Users browsing this thread: 2 Guest(s)