SA-MP Forums Archive
Is there a way to make a /top cmd? - 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: Is there a way to make a /top cmd? (/showthread.php?tid=649912)



Is there a way to make a /top cmd? - wallen - 17.02.2018

Well all i want is with pInfo[playerid][Respect], to make this command to view like 10 most respected players. But i've got no idea, i only know that i need to play with https://sampwiki.blast.hk/wiki/Control_Structures right? Any more ideas?

Or lets make it more easier, how do you make a command but instead of viewing most respected players, you view best scored player?


Re: Is there a way to make a /top cmd? - Mugala - 17.02.2018

which of the DB u're using?
for MySQL it's like mysql_query("SELECT `Name`, `Respect` FROM `Users` ORDER BY `Respect` DESC LIMIT 10"); (it's just an example)


Re: Is there a way to make a /top cmd? - wallen - 17.02.2018

Yeah it's mysql , thanks someone already sorted this out, thanks for your time !


Re: Is there a way to make a /top cmd? - Mugala - 17.02.2018

aw, okay, you're welcome