All pastes #634059 Raw Edit

Unnamed

public text v1 · immutable
#634059 ·published 2007-07-26 04:10 UTC
rendered paste body
public IsTeamDead(Team)
{
	for(new t=0; t<MAX_PLAYERS; t++)
		{
			if(gTeam[t] == Team)
				{
					new Float:iHealth,members,dead;
					members++;
					GetPlayerHealth(t,iHealth);
					
					if(iHealth <= 0)
						{
							dead++;
						}
						
					if(members == dead) // members and dead both start as 0. If the player is not dead
						{ // It will return true and not continue through the other players.
					return true; // Ends the function and returns true.
						}
				}
		}
	return false;
}