Quote:
Originally Posted by BaussHacker
Well your adding a value to the variable c for every member there is in the team.
The check you made is only checking if there is one member. If there is more or less, then it will just return. And I made a mistake as well, it should have been > 0. But true, the code should just be used as a reference.
|
well ..
Code:
if ( player.teamleader && player.alive)
c++;
player.teamleader is bool (and in team there can be only one leader) and player.alive is bool!
so this code counts alive team leaders.
next:: "winner" is teamleader. and its used as referance to reward team members.
Code:
foreach(tempplayer in winners.teammates)
{
// reward code
}
I hope this makes it clear. (sry for "spamming" but I just don't like to leave things unexplained)