Author Topic: [H] Removing Connect Messages  (Read 5728 times)

0 Members and 2 Guests are viewing this topic.

Offline Regen

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
[H] Removing Connect Messages
« on: October 17, 2019, 12:05:41 PM »
I was wondering if there is a way to remove the standard connection messages in chat, for some reason my server displays them 2x the amount it should normally when someone connects and I would like it disabled, thanks for your time.
Console:

Ingame:


Different players but the example of what's happening
« Last Edit: October 17, 2019, 12:16:23 PM by Regen »

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: [H] Removing Connect Messages
« Reply #1 on: October 17, 2019, 12:57:52 PM »
Certain types of chat messages can be filtered using the ChatText hook. The example below suppresses the default join/leave messages.

Code: [Select]
-- client-side
hook.Add( "ChatText", "HideJoinLeave", function( index, name, text, type )
  if type == "joinleave" then
    return true -- suppress
  end
end )

Offline Regen

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: [H] Removing Connect Messages
« Reply #2 on: October 17, 2019, 01:21:07 PM »
Where do I put this? in autorun or?

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: [H] Removing Connect Messages
« Reply #3 on: October 17, 2019, 01:22:51 PM »
Any client-side Lua file will do.

For example: (garrysmod)/lua/autorun/client/hidejoinleave.lua

Offline Regen

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: [H] Removing Connect Messages
« Reply #4 on: October 17, 2019, 09:09:32 PM »
The error still persist, if you got a steam contact I could add for help please lmk

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: [H] Removing Connect Messages
« Reply #5 on: October 18, 2019, 04:35:46 AM »
Oh, that's odd. Have you tried running your server without any addons?

If you prefer live support, consider joining the community Discord server and asking your question there.

You can also add me on Steam: https://steamcommunity.com/profiles/76561198074715892