23.08.2010, 02:47
like this ?
Код:
forward High(); public High() { static last; //it's static because it's like a global variable new highestid = INVALID_PLAYER_ID, highest = -1; for(new i = 0; i < MAX_PLAYERS; ++i) { if(GetPlayerScore(i) > highest) { highestid = i; highest = GetPlayerScore(i); } } if(highestid != INVALID_PLAYER_ID) { if(last != highestid) { team[last] = 0; } team[highestid] = 3; } last = highestid; }