SA-MP Forums Archive
Top 10 killers - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Top 10 killers (/showthread.php?tid=246485)



Top 10 killers - Baboon - 04.04.2011

Could anyone make or give me a script to find out who are the top 10 killers? I use as variable: kills[playerid];


Re: Top 10 killers - Joe Staff - 04.04.2011

http://forum.sa-mp.com/showthread.ph...re#post1002107


Re: Top 10 killers - Baboon - 04.04.2011

Код:
new TotalScores[15];
new PlayerScore[2];
for(new player;player<MAX_PLAYERS;player++)
{
    PlayerScore[0]=GetPlayerScore(player);
    for(new place;place<sizeof(TotalScores);place++)
    {
        if(PlayerScore[0]>TotalScores[place])
        {
            strins(TotalScores,PlayerScore,place);
            place=sizeof(TotalScores); //Stop the second loop (place)
        }
    }
}
I read ur stuff, but I didnt get it. I get 10 textdraws and it should show the first name (top killer) in Name1 (<-- textdraw) and the second one in Name2 etc. I want a top 10. Could you edit the script for me?