Chat box replacement

I hate the round; kiddish look of the chatbox. Are there any custom ones still around like this?

I think most chat boxes are kept private now-a-days.

Are there tutorials on how to script your own? I don’t even know where to start.


–These two hooks should stop the default chatbox from ever showing up
hook.Add( “StartChat”, “ChatStartChat”, function(t) return true end )
hook.Add( “HUDShouldDraw”, “ChatNoOldChatPlox”, function ( x ) if ( x == “CHudChat” ) then return false end end ) --Disable that fucking shitty chat

hook.Add( “Initialize”, “ChatInitialize”, function()
–Create your chatbox vgui here
end )

hook.Add(“PlayerBindPress”, “ChatOverrideChat”, function( ply, bind, pressed )
if ply == LocalPlayer() then
if string.find( bind, “messagemode” ) and pressed then

		local teamchat = string.find( bind, "messagemode2" ) != nil
		--Do some stuff, this hooks into when a player presses their chat key
		return true --Don't run the command

end )

hook.Add( “ChatText”, “ChatChatText”, function( entindex, name, text, msgtype )

--Useful information that you can use for your chatbox
return true --Don't display in default chatbox

end )

hook.Add( “OnPlayerChat”, “ChatOnPlayerChat”, function( ply, text, teamchat, dead )
–When a player talks you can do stuff
end )

oldChatAddText = chat.AddText – Save a reference to the original function, you could use it later to print to console in color! It’s actually printing to both the original chat and console, but you already disabled the original chat

function chat.AddText( … ) --fix

for k, v in pairs( {...} ) do
	--Even override the addtext function to use with your custom chatbox



there’s and extra parenthesis on line 13.

Yeah thanks, just stripped down my chatbox to the bare basics and missed that.

0.o wowzers thats confusing.

So where it says Create your chatbox vgui here, do I need to make a text box and a background or… I’m very confused right now. If you think that I shouldn’t be trying to make a chatbox because I’m so confused i’ll understand =p

Really if I could just take away the light grey bg, and filters button (and maybe the scrollbar) of the default box I would be fine with it.

It’s just some vgui creation and control. Not much you can really be confused about, unless you don’t understand Lua.

You can’t alter the default chatbox with Lua, you either have to remake it, make your own, or use default.