Biggest Score
#1

Hello,

I wanna get the player's name who has the biggest score in the server.
How can I do it?

Thanks
Nonameman
Reply
#2

Код:
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

Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)