Getting rid of the scoreboard entirely in a gamemode?
1 replies, posted
In my gamemode the scores for each team are at the top of the screen at all times. How do I disable the tab-scoreboard completely? It's extremely simple but I can't seem to find anything on it.
[CODE]function GM:ScoreboardShow()
return false
end
function GM:ScoreboardHide()
return false
end
function GM:HUDDrawScoreBoard()
return false
end[/CODE]
Does not work..
I believe it's something along the lines of this:
[lua]
function GM:ScoreboardShow()
--Initialize your scoreboard code here.
return true --This hides the default scoreboard.
end
function ScoreboardHide()
--Hide your scoreboard here with your code
end
[/lua]
That's how I do mine and it works; my scoreboard shows and the default one is not shown with it.
This is how I do mine:
[lua]
function ScoreboardShow()
if ( !IsValid(scoreboard) ) then
scoreboard = vgui.CreateFromTable(PScoreboard)
end
if ( IsValid(scoreboard) ) then
scoreboard:Show()
scoreboard:MakePopup(true)
scoreboard:SetKeyboardInputEnabled( false )
end
return true
end
hook.Add("ScoreboardShow", "ScoreboardShow", ScoreboardShow)
function ScoreboardHide()
if ( IsValid(scoreboard) ) then
scoreboard:Hide()
end
end
hook.Add("ScoreboardHide", "ScoreboardHide", ScoreboardHide)
[/lua]
Sorry, you need to Log In to post a reply to this thread.