Hide original message?!

How to hide original messages when smb connect or left the server?

Player Bot1 joined the game.

Player Bot1 has left the game.

[lua]
hook.Add(“ChatText”, “RemoveJoinLeaveMessages”, function(index, name, text, type)
if type == “joinleave” then return true end
end)
[/lua]
Client side.