ULX

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

0 Members and 1 Guest are viewing this topic.

Offline Regen

  • Newbie
  • *
  • Posts: 3
  • 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
  • Full Member
  • *****
  • Posts: 223
  • Karma: 161
  • Code monkey
    • ULX Unofficial Documentation
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 )
“When given the choice between being right or being kind, choose kind.”  —Dr. Wayne Dyer

Offline Regen

  • Newbie
  • *
  • Posts: 3
  • 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
  • Full Member
  • *****
  • Posts: 223
  • Karma: 161
  • Code monkey
    • ULX Unofficial Documentation
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
“When given the choice between being right or being kind, choose kind.”  —Dr. Wayne Dyer

Offline Regen

  • Newbie
  • *
  • Posts: 3
  • 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
  • Full Member
  • *****
  • Posts: 223
  • Karma: 161
  • Code monkey
    • ULX Unofficial Documentation
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
“When given the choice between being right or being kind, choose kind.”  —Dr. Wayne Dyer