• Disable Scoreboard in specific Gamemode (Terrortown)
    6 replies, posted
I tried to disable the scoreboard for the terrortown gamemode for innocents and detectives. I tried to override the GM:ScoreboardShow() [CODE] function ScoreBoardShowOverride() print("TEST THAT SCOREBOARD METHOD CALL") end GM.ScoreboardShow = ScoreBoardShowOverride[/CODE] and [CODE]function GM:ScoreboardShow() print("TEST THAT SCOREBOARD METHOD CALL") end[/CODE] but both things does not work... what is wrong? [url]https://github.com/garrynewman/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/gamemodes/terrortown/gamemode/cl_scoreboard.lua[/url] I found this file on the github project, is there something else I need to override?
Try this: [CODE] hook.Add( "ScoreboardShow", "blah", function() return true end ) [/CODE] You can probably check the gamemode in there as well
[QUOTE=MPan1;52124215]Try this: [CODE] hook.Add( "ScoreboardShow", "blah", function() return true end ) [/CODE] You can probably check the gamemode in there as well[/QUOTE] But to hooks are only post or? So first the Scoreboard GUI is drawing, then the hook function is called.
[QUOTE=Rytech;52124545]But to hooks are only post or? So first the Scoreboard GUI is drawing, then the hook function is called.[/QUOTE] You're wrong. Why even ask? At least try it first
[QUOTE=JasonMan34;52124784]You're wrong. Why even ask? At least try it first[/QUOTE] It works. But why?
[QUOTE=Rytech;52124882]It works. But why?[/QUOTE] Can't answer you unless you make sense in your post. I have no idea what you're asking
[QUOTE=Rytech;52124882]It works. But why?[/QUOTE] Returning something in a hook will override the others.
Sorry, you need to Log In to post a reply to this thread.