Hello everyone! I am trying to create a convar that hides my hud when enabled and shows it when disabled. Below is my convar, but I am not sure how to make it hide my hud. I was hoping someone here can help me! Thanks in advanced and all of the help is appreciated.
I think I do it like this:
CreateClientConVar( "hide_rpghud", "0", true, false )
local function HudPaintDraw()
if (LocalPlayer():Alive() and hide_rpghud == 0) then
DrawHUD()
end
end
hook.Add("HUDPaint", "HUDPaint_hudteamfrench", HudPaintDraw)
ConVar
if not GetConVar("hide_rpghud"):GetBool then
DrawHUD()
end
Thank you very much. I also realized I needed this:
local hideRpgHud = CreateClientConVar( "show_rpghud", "0", true, false ) -- 1 is show and 0 is hide
Sorry, you need to Log In to post a reply to this thread.