SA-MP Forums Archive
Question. - 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: Question. (/showthread.php?tid=521772)



Question. - tuuler - 24.06.2014

Hello, I want to know who has the biggest score in my server for top 1 textdraw, but how can I set it if player is offline and someone overrides his score and then that person goes top 1?
I hope u guys understand and can help me. (I can create another file for that if needed)


Re: Question. - Rittik - 24.06.2014

This just a simple hint/logic code.You can get idea from this though.

Under OnPlayerUpdate

Код:
new a;
for(new i=0;i<MAX_PLAYERS;i++)
{
 if(a < PlayerInfo[i][pScores])
  {
    a = PlayerInfo[i][pScores];
  }
}