Biggest Score - 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: Biggest Score (
/showthread.php?tid=155305)
Biggest Score -
Nonameman - 17.06.2010
Hello,
I wanna get the player's name who has the biggest score in the server.
How can I do it?
Thanks

Nonameman
Re: Biggest Score -
(SF)Noobanatior - 18.06.2010
Код:
new test,leader;
for (new i=0;i<MAX_PLAYER;i++){
if(GetPlayerScore(i) > test){
leader = i;
test=GetPlayerScore(i);
}
}
//leader is the id of the player with the highest score and test is the amount of there score
something like that if two or more players have the same score leader will equal the leading player with the lowest id
Re: Biggest Score -
Nonameman - 18.06.2010
thanks