20.12.2016, 05:48
So, as you see I created another theme with new question
how to get from the all server players one player, who have highest value?
I tried this code, but it don't works correctly.
how to get from the all server players one player, who have highest value?
Код HTML:
new HighestValue, HighestPlayerValueID;
for(new i = 0; i < MAX_PLAYERS; ++ i)
{
if(PlayerValue[i] > HighestValue)
{
HighestPlayerValueID = i;
HighestValue = PlayerValue[HighestPlayerValueID];
}
}
printf("Highest value owner: %d. Value: %d", HighestPlayerValueID, HighestValue);