03.03.2012, 05:31
This will get the player with the highest score:
pawn Код:
new
iHighest;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerScore(i) > GetPlayerScore(iHighest)) iHighest = i;
}
}
// The variable: "iHighest" now contains the player id holding the highest score.