[HELP] Sort scoreboard by score!
#1

Hello. How can i sort scoreboard by score. For example, player with highest score is first and etc.

I tried this https://sampforum.blast.hk/showthread.php?pid=1092420#pid1092420 but i dont know how to use it!
Reply
#2

if i understand you, tou want to check the player who has the biggest score:

i'l build for you stock

Код:
stock GetHighestScore()
{
    new score,player;
    for(new i; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) if(GetPlayerScore(i) > score) score  = GetPlayerScore(i),player = i;
    return player;
}
and if you want to check the player with the highest score:

Код:
new highscoreplayer = GetHighestScore();
and in the highscoreplayer it has the id of the player with the highest score..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)