[Include] Top Players
#9

Quote:
Originally Posted by Gangs_Rocks
Посмотреть сообщение
Can you explain how can I make a top 3 players online with this?

What I'm trying to do is

I've made a textdraw which should show

1. [NAME] [MapKills]
2. [NAME] [MapKills]
3. [NAME] [MapKills]
You [MapKills]

Now, the you part is okay
But
BUT
BUT
The 1-2-3 all show ID 0.

Now I'm trying to use your include to do it and here's my stock

pawn Код:
stock GetSpots()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        FeedInfo(i, pStats[i][MapKills]);
    }
    return 1;
}
But I don't really understand how I can sort the top 3 players :/ any help?
Try this

pawn Код:
stock GetSpots()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
            if(IsPlayerConnected(i)) FeedInfo(i, pStats[i][MapKills]);
    }
        new rank[3];
    for(new i=0;i<3;++i) rank[i] =   t_GetPlayer(i+1, 1)//Descending as we wish player with max kills to be first
    //Now rank[0] have player whose rank is first, rank[1] with second and so on.
//You can now get PlayerName by using
    GetPlayerName(rank[0]..
    return 1;
}
Reply


Messages In This Thread
Top Players - by [MM]RoXoR[FS] - 21.07.2012, 14:26
Re: Top Players - by Spookie98 - 21.07.2012, 14:51
Re: Top Players - by [MM]RoXoR[FS] - 21.07.2012, 15:31
Re: Top Players - by Finn - 21.07.2012, 15:39
Re: Top Players - by Ronaldo_raul™ - 21.07.2012, 16:02
Re: Top Players - by Gangs_Rocks - 21.09.2012, 08:30
Re: Top Players - by DeadLy™ - 21.09.2012, 10:00
Re: Top Players - by Q_Lite - 21.09.2012, 11:05
Re: Top Players - by [MM]RoXoR[FS] - 25.09.2012, 10:15
Re: Top Players - by Slice - 25.09.2012, 11:59
Re: Top Players - by [MM]RoXoR[FS] - 26.09.2012, 14:59
Re: Top Players - by [MM]RoXoR[FS] - 29.09.2012, 13:27
Re: Top Players - by Guest4390857394857 - 17.02.2014, 11:41
Re: Top Players - by fiki574 - 17.02.2014, 19:20
Re: Top Players - by CODRWW - 17.02.2014, 19:27
Re: Top Players - by Guest4390857394857 - 18.02.2014, 11:34

Forum Jump:


Users browsing this thread: 1 Guest(s)