top 5 killers!!! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: top 5 killers!!! (
/showthread.php?tid=156909)
top 5 killers!!! -
billiout - 24.06.2010
i want to check the player with the most kills and thesecond with the most kills etc using dudb system. i want to show the top 5of best killers online. how i can do that with dudb? i mean how i can show the player with the highest kills.
pls help!!
Re: top 5 killers!!! -
ViruZZzZ_ChiLLL - 24.06.2010
Hmmm.... I want to know how to do this too,
so, I'm joining the question
Re: top 5 killers!!! -
Flashy - 24.06.2010
Thatґs easy when you know exactly what to do.
Search on this forum for "toplist". I think there is already a tutorial for this lists.
I will post the link if I find.
Re: top 5 killers!!! -
billiout - 24.06.2010
yes but for dudb? i mean i want to load the saved info ex kills and from all players and show the first with most kills.
Re: top 5 killers!!! -
NiiRV4N4 - 24.06.2010
create a loop and find who has the highest score.
every kill someone gets they get a score point.
you need to know math...
Re: top 5 killers!!! -
ReVo_ - 24.06.2010
pawn Код:
new best,score;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerScore(i) >= score)
{
best=i;
score=GetPlayerScore(i);
}
}
printf("fist best is %d - %d",best,score);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)&&GetPlayerScore(i)>=score&&best!=i)
{
best=i;
score=GetPlayerScore(i);
}
}
printf("second is %d - %d",best,score);
I not tested
Re: top 5 killers!!! -
[HiC]TheKiller - 24.06.2010
I'm making a function for this soon, I'll keep you updated.