SA-MP Forums Archive
Display scoreboard by code - 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: Display scoreboard by code (/showthread.php?tid=496144)



Display scoreboard by code - PowerPC603 - 20.02.2014

Hi all,

I've got a question.

You can press TAB to see the scoreboard.
And you can use OnPlayerClickPlayer to react on this scoreboard.
I've created code to display the clicked player's stats in a list-dialog when an admin clicks on a player in the scoreboard.

But I would like to re-display the scoreboard when the admin presses ESC (the Cancel button).
Right now, pressing ESC just closes the dialog.

Is this possible somehow, to open the scoreboard through code?


Re: Display scoreboard by code - bensmart469 - 20.02.2014

It's not possible in sa-mp, since:
- There is no way to detect the esc key being pressed in sa-mp, unless you used if(!response) in a dialog - https://sampwiki.blast.hk/wiki/Keys
- You cannot show the scoreboard in sa-mp unless you used one with textdraws which was completely custom.


Re: Display scoreboard by code - xo - 20.02.2014

You can show the admin the dialog again if(!response) .. but opening scoreboard is not possible, i would just spam my players withe opening it till they crash ahah


Re: Display scoreboard by code - PowerPC603 - 20.02.2014

I thought as much.
I couldn't find any command that does this.

Well, no worries then, I might need to create one (a replica of the scoreboard) myself if it's really required.