GM/ScoreboardShow

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(This hook does not have any return values, the effect documented was caused by the hook library)
(Added info about hiding the default scoreboard by returning a bool. After testing, it turns out you can return anything and it'll still hide it.. I've set it as bool because it sounds more logical)
Line 5: Line 5:
 
|Name=ScoreboardShow
 
|Name=ScoreboardShow
 
|Parent=GM
 
|Parent=GM
 +
}}
 +
{{Ret
 +
|type=boolean
 +
|desc=Return true to hide the default scoreboard
 +
}}
 +
{{Example
 +
|Description=Hides the default scoreboard.
 +
|Code=function hideScoreboard()
 +
    return true
 +
end
 +
hook.Add( "ScoreboardShow", "HideScoreboard", hideScoreboard )
 
}}
 
}}

Revision as of 20:35, 4 September 2015

 GM:ScoreboardShow( )

Contents

Description

Called when player presses the scoreboard button. ( TAB by default )

Returns

boolean

Return true to hide the default scoreboard

Examples

Example

Hides the default scoreboard.

function hideScoreboard()
    return true
end
hook.Add( "ScoreboardShow", "HideScoreboard", hideScoreboard )


Personal tools
Navigation