Override default connection messages w/ script

How do I override the default “Player xyz has joined the game” message? This is the code I have currently;



function connect(name, ip)
	PrintMessage(3, name .. " has connected to the server.")
	return true
end
hook.Add("PlayerConnect", "PlayerConnect_", connect)


However, it just prints my hook’s message alongside the default one, instead of overriding it.

GM/ChatText
example 1

Is there a list of what kinds of values the “type” argument can have?

I couldn’t find a list but from what you need the one in the example should work the only other one I know of is “chat” to override messages :smiley:

http://gmodwiki.net/Lua/Hooks/Base/ChatText