03.12.2010, 16:56
Untested .. returns the player ID with the highest score.
pawn Код:
stock GetPlayerWithMostScore()
{
new
sHighestID = INVALID_PLAYER_ID,
sHighest = 0;
for(new i; i < MAX_PLAYERS; i++)
{
if(GetPlayerScore( i ) > sHighest)
{
sHighest = GetPlayerScore(i);
sHighestID = i;
}
}
return sHighestID;
}