Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

HUD Toggle / Screenshot script - A Config Script for Half-Life 2

4 171 bytes Raw Code
1
2
3
4
bind x "hudoff"
alias hudoff "cl_drawhud 0; wait; r_drawviewmodel 0; bind x "hudon"
alias hudon "
cl_drawhud 1; wait; r_drawviewmodel 1; bind x "hudoff"
jpeg_quality 100
bind x "hudoff"
alias hudoff "cl_drawhud 0; wait; r_drawviewmodel 0; bind x "hudon"
alias hudon "cl_drawhud 1; wait; r_drawviewmodel 1; bind x "hudoff"

jpeg_quality 100


This is a pretty basic use of aliases in scripting, it disables your viewmodel and hud on the push of a button, then enables them again when you push the same button. The default button is X but you can change that, just replace all the "X"s after the word "bind" with whatever key you want. I use this whenever I'm trying to take a screenshot.

No comments yet