Gamemode.HUDShouldDraw

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameHUDShouldDraw
SyntaxGM:HUDShouldDraw( String name )
DescriptionA string containing the name of the hud object checking to see if it can be displayed. See: Hud Elements
ReturnsBoolean
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.HUDShouldDraw]Gamemode.HUDShouldDraw [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionThis function hides the health and battery (armor) displays.
Used onNewerClient.png
Code
local function HideThings( name )
	if(name == "CHudHealth") or (name == "CHudBattery") then
             return false
        end
        -- We don't return anything here otherwise it will overwrite all other 
        -- HUDShouldDraw hooks.
end
hook.Add( "HUDShouldDraw", "HideThings", HideThings )
OutputN/A


Additional Notes


CAchievementNotificationPanelAchievement notifications
CHudHealthYour Health
CHudSuitPowerMost likely Auxiliary Power
CHudBatteryYour Armor
CHudCrosshairYour crosshair
CHudAmmoPrimary Ammo
CHudSecondaryAmmoSecondary Ammo
CHudChatThe chat area
CHudCloseCaptionThe closed-caption messages
CHudCreditsCredits
CHudDeathNoticeDeath notices that appear at the top right of the screen
CHudTrainControls when using a func_train?
CHudMessageMessages printed to the center of the screen
CHudMenuUnknown
CHudWeaponUnknown
CHudWeaponSelectionPlayer weapon selection menu
CHudGModHUD's produced by Garrysmod
CHudDamageIndicatorThe red trapazoids displayed on the side of the screen when damage is taken, also includes the red screen you get when died from combat.
CHudHintDisplayDisplays hints as seen in Half-Life 2
CHudVehicleControl panel when entering a vehicle/crane?
CHudVoiceStatusShows when other players use microphone voice chat.
CHudVoiceSelfStatusShows when the local player uses microphone voice chat.
CHudSquadStatusSquad status panel shown when rebels join your squad
CHudZoomDimming and large crosshair
CHudCommentaryDisplay showing the duration and progress of the currently active commentary node
CHudGeigerCommentary panel
CHudHistoryResourceList of items/ammunition the player recently picked up
CHudAnimationInfoDisplays information about HUD elements, activated by the console command cl_animationinfo
CHUDAutoAimUnknown
CHudFilmDemoUnknown
CHudHDRDemoLost Coast HDR Demonstration HUD element
CHudPoisonDamageIndicatorPanel that appears upon a player receiving poison [Neurotoxin] damage
CPDumpPanelPanel that appears when using cl_pdump

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox