BestKiller
#9

Try this
pawn Код:
if (strcmp("/best", cmdtext, true, 10) == 0)
{
    new best[4], currentscore = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && Kills[i] > currentscore)
        {
            best[0] = i;
        }
    }
    currentscore = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && Kills[i] > currentscore && i != best[0])
        {
            best[1] = i;
        }
    }
    currentscore = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && Kills[i] > currentscore && i != best[0] && i != best[1])
        {
            best[2] = i;
        }
    }
    currentscore = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && Kills[i] > currentscore && i != best[0] && i != best[1] && i != best[2])
        {
            best[3] = i;
        }
    }
    new string[128];
    format(string, sizeof(string), "%s - Killed %d People\n%s - Killed %d People\n%s - Killed %d People\n%s - Killed %d People", Nick(best[0]), Kills[best[0]], Nick(best[1]), Kills[best[1]], Nick(best[2]), Kills[best[2]], Nick(best[3]), Kills[best[3]]);
    ShowPlayerDialog(playerid, 658, DIALOG_STYLE_MSGBOX, "BestKiller List", string, "Close", "");
   
    return 1;
}
Reply


Messages In This Thread
BestKiller - by NoaM[W] - 24.11.2012, 11:27
Re: BestKiller - by [ABK]Antonio - 24.11.2012, 11:38
Re : BestKiller - by NoaM[W] - 24.11.2012, 12:45
Re : BestKiller - by NoaM[W] - 25.11.2012, 12:18
AW: BestKiller - by Skimmer - 25.11.2012, 12:34
Re : BestKiller - by NoaM[W] - 25.11.2012, 12:45
AW: BestKiller - by Skimmer - 25.11.2012, 12:47
Re : BestKiller - by NoaM[W] - 25.11.2012, 13:22
AW: BestKiller - by Skimmer - 25.11.2012, 13:52
Re : AW: BestKiller - by NoaM[W] - 25.11.2012, 15:33

Forum Jump:


Users browsing this thread: 2 Guest(s)