Author Topic: Removing the Disconnect Message  (Read 1754 times)

0 Members and 1 Guest are viewing this topic.

Offline axeboy1778

  • Newbie
  • *
  • Posts: 6
  • Karma: -1
Removing the Disconnect Message
« on: July 19, 2014, 12:55:53 AM »
How can I remove the (Axeboy1778 has disconnected. (STEAM_0:1:00000000)) disconnect message? I have something else that solves this, so having both looks fairly odd and unnecessary.

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: Removing the Disconnect Message
« Reply #1 on: July 19, 2014, 04:34:05 AM »
Hello,
take a look at this hook: GM/PlayerDisconnected

Avoid

Offline axeboy1778

  • Newbie
  • *
  • Posts: 6
  • Karma: -1
Re: Removing the Disconnect Message
« Reply #2 on: July 19, 2014, 12:42:05 PM »
I know, but isn't it something in ulx/ulib making that message? I have a message like that already and I want to get rid of the ulx/ulib default one, but I don't know how/where to find it.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Removing the Disconnect Message
« Reply #3 on: July 19, 2014, 12:56:56 PM »
I know, but isn't it something in ulx/ulib making that message? I have a message like that already and I want to get rid of the ulx/ulib default one, but I don't know how/where to find it.

No? I'm quite certain it's a Garry's Mod thing.
Out of the Garry's Mod business.

Offline axeboy1778

  • Newbie
  • *
  • Posts: 6
  • Karma: -1
Re: Removing the Disconnect Message
« Reply #4 on: July 19, 2014, 01:03:55 PM »
Does anyone know where I can find that message?

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Removing the Disconnect Message
« Reply #5 on: July 19, 2014, 03:10:51 PM »
We don't generate this message inside of ULX.
I took a look at the base gamemode PlayerDisconnected hook and it doesn't seem to explicitly call that message, but I think if you override the function it will not print it.

Inside of your init.lua file for your gamemode just place this:

Code: [Select]
function GM:PlayerDisconnected( player )
end

Offline axeboy1778

  • Newbie
  • *
  • Posts: 6
  • Karma: -1
Re: Removing the Disconnect Message
« Reply #6 on: July 19, 2014, 05:50:36 PM »
That worked perfectly. Thanks MrPresident  :)