Making my only chat box and need the chat box to be disabled.
You can hide the chatbox with this hook: [b][url=wiki.garrysmod.com/?title=Gamemode.HUDShouldDraw]Gamemode.HUDShouldDraw [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[lua]
function HideChatbox(name)
if(name == "CHudChat") then
return false
end
end
hook.Add("HUDShouldDraw", "HideChatbox", HideChatbox)
[/lua]
by the way, that hook is clientside.
[QUOTE=NullPoint;19423039][b][url=wiki.garrysmod.com/?title=Gamemode.StartChat]Gamemode.StartChat [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[b][url=wiki.garrysmod.com/?title=Gamemode.ChatTextChanged]Gamemode.ChatTextChanged [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b][/QUOTE]
That won't keep the chatbox from displaying, though.
[QUOTE=Gbps;19432537]That won't keep the chatbox from displaying, though.[/QUOTE]
Returning true in the StartChat hook does AFAIK.
[editline]10:53PM[/editline]
Please, correct me if I am wrong.
[QUOTE=NullPoint;19432553]Returning true in the StartChat hook does AFAIK.
[editline]10:53PM[/editline]
Please, correct me if I am wrong.[/QUOTE]
That's true.
[QUOTE=iRzilla;19442084]Won't hide it until you press your chat key though.[/QUOTE]
Good point.
Sorry, you need to Log In to post a reply to this thread.