SA-MP Forums Archive
How to compare max players points - 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 compare max players points (/showthread.php?tid=636151)



How to compare max players points - Aldrago - 21.06.2017

Hello guys I am trying to make a tournament DM in which I want to get a winner so how can I do it max players points compare and >greater points player is winner sorry for my rip English plz give me an example


Re: How to compare max players points - NewFreeroamStunt - 21.06.2017

try this

https://sampforum.blast.hk/showthread.php?tid=631637


Re: How to compare max players points - Aldrago - 21.06.2017

There is nothing like I want todo


Re: How to compare max players points - saffierr - 21.06.2017

I didn't quite understand the question?
Could you elaborate it a little more detailed?


Re: How to compare max players points - Eoussama - 21.06.2017

Do you mean, you want to know how to get who has the greatest points among players?

PHP код:
stock GetWinner(){
     new 
winnerPointswinnerID = -1;
     for(new 
iGetPlayerPoolSize(); i<ji++){
          if(
IsPlayerConnected(i) && pInfo[i][Points] > winnerPoints){
                
winnerPoints pInfo[i][Points];
                
winnerID i;
          }
          return 
winnerID;
     }