how to pick 3 best players - 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)
+--- Thread: how to pick 3 best players (
/showthread.php?tid=657714)
how to pick 3 best players -
severance - 14.08.2018
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.
Re: how to pick 3 best players -
Heress - 15.08.2018
https://sampforum.blast.hk/showthread.php?tid=330005
You can do something like this....
Re: how to pick 3 best players -
severance - 15.08.2018
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
Re: how to pick 3 best players -
KinderClans - 15.08.2018
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;
}
Re: how to pick 3 best players -
severance - 15.08.2018
Yeah, i'll try this one