19.01.2011, 13:58
pawn Код:
stock GetPlayerWithHighestScore()
{
new
scoreMax = cellmin,
scoreTemp,
playerid = -1
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
if((scoreTemp = GetPlayerScore(i)) > scoreMax)
{
scoreMax = scoreTemp;
playerid = i;
}
}
}
return playerid;
}