19.01.2011, 13:41
UPDATE:
GetPlayerWithHighestScore(); is working now. Here it is:
GetPlayerWithHighestScore(); is working now. Here it is:
pawn Код:
GetPlayerWithHighestScore()
{
new HighestScore = -999999999, ID = INVALID_PLAYER_ID;
for(new i = 0; i < 500; i++){
if(!IsPlayerConnected(i)) continue;
if(GetPlayerScore(i) > HighestScore){
HighestScore = GetPlayerScore(i);
ID = i;
}
continue;
}
return ID != INVALID_PLAYER_ID ? ID : -1;
}