24.06.2010, 19:17
pawn Код:
new best,score;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerScore(i) >= score)
{
best=i;
score=GetPlayerScore(i);
}
}
printf("fist best is %d - %d",best,score);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)&&GetPlayerScore(i)>=score&&best!=i)
{
best=i;
score=GetPlayerScore(i);
}
}
printf("second is %d - %d",best,score);