Top 10 ?
#5

oh sorry you wanted the top 10
i know Setkus allredy posted a code
but i made a really simple one but its not tested so if someone could test it it would be great
pawn Код:
COMMAND:top10(playerid, params[])
{
new TopPlayers[9+1];
new highestid = INVALID_PLAYER_ID, highest = -1;
SendClientMessage(playerid,YELLOW,"Top 10 Players");
new MAX;
MAX=0;
for(new i = 0; i < MAX_PLAYERS; ++i)
{
    if(GetPlayerScore(i) > highest && MAX<=10)
    {
        MAX++;
        highestid = i;
        highest = GetPlayerScore(i);
        new Name[MAX_PLAYER_NAME];GetPlayerName(i,Name,sizeof(Name));
        new TOP[128];format(TOP,sizeof(TOP),"[%d]%s",TopPlayers,Name);
        SendClientMessage(playerid,YELLOW,TOP);
    }
    return 1;
}
if(highestid != INVALID_PLAYER_ID && TopPlayers[0])
{
    SendClientMessage(playerid,YELLOW,"Num 1");
}
return 1;
}
Reply


Messages In This Thread
Top 10 ? - by The-Warrior - 16.07.2011, 15:38
Re: Top 10 ? - by park4bmx - 16.07.2011, 15:40
Re: Top 10 ? - by The-Warrior - 16.07.2011, 15:41
Re: Top 10 ? - by Setkus - 16.07.2011, 16:04
Re: Top 10 ? - by park4bmx - 16.07.2011, 16:34
Re: Top 10 ? - by Shadoww5 - 16.07.2011, 16:50
Re: Top 10 ? - by Ronaldo_raul™ - 16.07.2011, 18:43
Re: Top 10 ? - by Shadoww5 - 16.07.2011, 19:09
Re: Top 10 ? - by Ronaldo_raul™ - 16.07.2011, 19:22
Re: Top 10 ? - by MoroDan - 16.07.2011, 19:59

Forum Jump:


Users browsing this thread: 4 Guest(s)