block scoreboard
block scoreboard
right now im trying to find a way to block the scoreboard from being viewed from players on a server( clicking tab ).
my guess is, that it isnt possible at all, as the function might merely run on the client, yet considering that hud visibility can be effected via the playerobject. anybody knows specifics?
thanks in advance
my guess is, that it isnt possible at all, as the function might merely run on the client, yet considering that hud visibility can be effected via the playerobject. anybody knows specifics?
thanks in advance
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: block scoreboard
Syntax: Select all
from entities.entity import BaseEntity
from entities.hooks import EntityCondition
from entities.hooks import EntityPreHook
from memory import make_object
from messages import VGUIMenu
from players import UserCmd
from players.constants import PlayerButtons
hidden_scores = VGUIMenu('scores', show=False)
@EntityPreHook(EntityCondition.is_human_player, 'run_command')
def pre_player_run_command(stack_data):
ucmd = make_object(UserCmd, stack_data[1])
if not ucmd.buttons & PlayerButtons.SCORE:
return
hidden_scores.send(make_object(BaseEntity, stack_data[0]).index)
Re: block scoreboard
thanks for sending code, but ive already tried blocking the command, but the scoreboard still pops up , thats why my question mainly regarded if the client has a separate launch or if its pure serverside
Re: block scoreboard
Well, there're at least 2 approaches: blocking the command and sending hidden scoreboard every time the command is executed.
If the code above doesn't work, my guess is that client is showing the scoreboard AFTER we have hidden it in run_command. Maybe a posthook or a delay?
If the code above doesn't work, my guess is that client is showing the scoreboard AFTER we have hidden it in run_command. Maybe a posthook or a delay?

My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.

Re: block scoreboard
i havent tried any further code yet, but im sure ill find a way. BUT i need to know if the scoreboard ONLY gets called "from the server". if the client has its own "preopen" function ( first tick ), thered be no need of approaching this matter anyway for me.
Re: block scoreboard
I just tested L'In20Cible's code and it's working fine for me. Note that it doesn't block the command, but tells the client to hide the scoreboard when he wants to open it.
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: block scoreboard
*just saw last replies but I'm posting this anyways.
Actually, this code is not blocking the display itself, it send the signals to hide the panel once displayed. I tested this code on windows and it is working. The scoreboard is already displayed when run_command is executed so it get rendered for a frame (the time we send our own signal to hide it). Next step would be to hook the usermessage itself and see if the server is sending the initial signal to show it but I'm fairly sure this is predicted client-side and from a server-side plugin, you won't get any better results.
Actually, this code is not blocking the display itself, it send the signals to hide the panel once displayed. I tested this code on windows and it is working. The scoreboard is already displayed when run_command is executed so it get rendered for a frame (the time we send our own signal to hide it). Next step would be to hook the usermessage itself and see if the server is sending the initial signal to show it but I'm fairly sure this is predicted client-side and from a server-side plugin, you won't get any better results.
Re: block scoreboard
yes sorry, the code is ofc working, but my goal is to completly hide the scoreboard for clients , no blinking etc.
edit: using the vgui hide in ontick wrapper almost never makes it pop, which makes it probable, that the server ALWAYS gives some sort of callback, so blocking all remote functions (maybe with NOP's) would do the job?
edit: using the vgui hide in ontick wrapper almost never makes it pop, which makes it probable, that the server ALWAYS gives some sort of callback, so blocking all remote functions (maybe with NOP's) would do the job?
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: block scoreboard
I don't think so. My guess is that since you constantly send the signal to hide it, it does hide it faster since it doesn't have to wait the server to reply once the panel is already displayed.
Re: block scoreboard
Just hooked IVEngineServer::UserMessageBegin() to see if it gets called when opening the scoreboard. But it has never been called, so that part is handled by the client.
Re: block scoreboard
okay, makes more sense anyway, but is unfortunate for me :/ im wondering though how vgui hide gets called within the client. it must somehow have a function there that blocks the clients scoreboard call for x time/x press times. i might take a look at how that works, otherwise i guess i have to dismiss any solutions here
edit: i guess the server sends a "valid" scoreboard, but one that is "hidden"/invisible. ( only one scoreboard call can run parrallely on client ) therefor the only way would be to constantly send a hidden scoreboard, but i doubt that will be fully what i want. but thanks for everyones suggestions !
edit: i guess the server sends a "valid" scoreboard, but one that is "hidden"/invisible. ( only one scoreboard call can run parrallely on client ) therefor the only way would be to constantly send a hidden scoreboard, but i doubt that will be fully what i want. but thanks for everyones suggestions !
- PhantomDancer
- Member
- Posts: 42
- Joined: Wed Mar 15, 2017 10:39 am
- Location: The Great Arctic Hemispheres
Re: block scoreboard
https://github.com/Source-Python-Dev-Te ... t.cpp#L118
does "@ClientCommand" here use an inbuilt filter for some commands before the hooks passes? and is this inbuilt filter only filtering usercmd initiated commands or/and anything else? if so,is this filter even suitable here?
im looking into this, as i am wondering if a solution could be to intercept "+score" before this filter escapes the clientcommand hook on sps endpoint and insert a vguimenu (scoreboard hidden) send for that case. i kinda assume that usermsgs are more tickreliable than usercmds. thats why i want to test it. but am not really sure about that. other than that this is the same as the first proposed solution.
maybe someone knows this off head. otherwise ill test it later. thanks!
does "@ClientCommand" here use an inbuilt filter for some commands before the hooks passes? and is this inbuilt filter only filtering usercmd initiated commands or/and anything else? if so,is this filter even suitable here?
im looking into this, as i am wondering if a solution could be to intercept "+score" before this filter escapes the clientcommand hook on sps endpoint and insert a vguimenu (scoreboard hidden) send for that case. i kinda assume that usermsgs are more tickreliable than usercmds. thats why i want to test it. but am not really sure about that. other than that this is the same as the first proposed solution.
maybe someone knows this off head. otherwise ill test it later. thanks!
Re: block scoreboard
I doubt "+score" is sent to the server to be intercepted as a ClientCommand, but you can certainly test.
- PhantomDancer
- Member
- Posts: 42
- Joined: Wed Mar 15, 2017 10:39 am
- Location: The Great Arctic Hemispheres
Re: block scoreboard
it seems the server cant control turning off the scoreboard at all. not even natively. ( i couldnt find it ) so i have to send it every tick. which is a bad solution. but sending it after reading the usercmd, is slightly too late. even in ontick a brief popup of the unwanted scoreboard occurs. which is already an inconvenience. anyway, ill keep the thread updated in case i find a workaround as ill keep being on the lookout
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 109 guests