local tabmain
hook.Add("ScoreboardShow", "TabShow", function()
ScoreboardOpen()
if IsValid(tabmain) then
tabmain:Show()
// Main:MakePopup()
gui.EnableScreenClicker(true)
tabmain:SetKeyboardInputEnabled(true)
end
return true
end)
function ScoreboardOpen()
if not IsValid(tabmain) then
LocalPlayer().Scoreboard = true
-- код таба
end
end
function GM:ScoreboardHide()
hook.Add("ScoreboardHide", "TabHide", function()
if IsValid(tabmain) then
tabmain:SetKeyboardInputEnabled(false)
LocalPlayer().Scoreboard = false
ScoreboardClose()
gui.EnableScreenClicker(false)
end
end)
function ScoreboardClose()
if IsValid(tabmain) then
tabmain:Close()
LocalPlayer().Scoreboard = false
gui.EnableScreenClicker(false)
end
end