how to pick 3 best players
#1

Hello i'm working on a sophisticated damage system and i want to pick 3 best players who did best damage, example:

(1) %s did 400 damage.
(2) %s did 300 damage.
(3) %s did 200 damage.

I need to know how can you take those 3 players and put them on a list like i stated before??



Highly appreciated any threads/tutorials or a tip guys.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=330005
You can do something like this....
Reply
#3

Not that i already have a damage system, but i want to pick up 3 best players each 15 minutes in chat like i told above.
Example: 3 best player money, i need to make a check/loop through everyone in the server and only picking up 3 players which has high numbers
Reply
#4

Something like this?

pawn Код:
CMD:richlist(playerid)
{
    new data[MAX_PLAYERS][2];
    foreach (new i : Player)
    {
        data[i][0] = GetPlayerMoney(i);
        data[i][1] = i;
    }

    QuickSort_Pair(data, true, 0, Iter_Count(Player));

    SendClientMessage(playerid, -1, "* Top 5 rich players currently online:");
    new buf[150];
    for (new i; i < 5; i++)
    {
        if (data[i][0])
        {
            format(buf, sizeof(buf), "%i. %s (%i) - %i$", i + 1, ReturnPlayerName(data[i][1]), data[i][1], data[i][0]);
            SendClientMessage(playerid, COLOR_DODGER_BLUE, buf);
        }
    }
    return 1;
}
Reply
#5

Yeah, i'll try this one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)