Hello
I am trying to disable the “playername joined.” messages on the top left of the screen that come from the chat/server when players join.
I have not found any current posts here about this specific tweak and I can not seem to get them to stop even after commenting out the “messageEntered” portion of the CFX default chat.
I also use okokChat and have menuv installed
Any help as to how to remove these messages is helpful and appreciated as my players are requesting anonymity from their entrance and exit of the server.
Thank you in advance.
I commented out the whole AddEventHandler code in the sv_chat.lua
–[[ THAT CODE ]]-- with the brackets like that.
It worked perfectly.
Thank you for your time and assistance in answering this.
I had searched for “join” in all of my files but had somehow overlooked that event handler until you pointed it out.
Hopefully this helps others in the future as well.
Hi no problem you can do what [TheIndra] recommended as well.
Btw for the old chat that i used to use i had to remove the lines i told u.
But now they updated it so its different to do.
Even though my method works, I am curious as to where I could add those convars?
Could they be put into the server.cfg somehow?
Forgive me as I am not used to using the system to execute convars. Any clarification as to how I could go about that would be really cool to have shared.
I’ve seen certain servers that have a custom message when players crash, for example instead of: “name left (long crash code)”, one had “name left (crashed)”. I’ve looked through a few different chat addons and through the default chat resource, as you said before there isn’t anything for crashes, i just don’t want long crash codes filling the chat every time someone crashes, assuming they will of course.
If you have any idea how i could do this or where i could get such an addon / script to look into and understand how they did, it would be much appreciated.
then wherever you want or create a resource and capture the playerDropped event
server.lua
AddEventHandler('playerDropped', function(reason)
local i, j = string.find(reason, 'crash')
if i then
-- your custom message code when client crash
else
-- your custom message code when client quit
end
end)
AddEventHandler('playerDropped', function(reason)
local i, j = string.find(reason, 'crash')
if i then
-- your custom message code when client crash
else
local a, b = string.find(reason, 'timeout')
if a then
-- your custom message code when client timeout
else
-- your custom message code when client quit
end
end
end)
You are going to have to check that the reason cointains the word crash when the client crashes, and the word timeout when it is disconnected by ping because I’m not sure… but it should work
i am just very confused, i copied your script exactly earlier and forced my game to crash, but it just posted the default crash error, so I’m not 100% sure what is going on exactly or if i am doing something wrong.
as long as the crash error has the word “crash” in it, it will work, or?
cause like before i was trying to replace “-- your custom message code when client crash” with a message in chat when you crash instead of the error code but it was just giving me a parsing error starting the addon and would never start. without changing anything it would load the addon but it wouldn’t actually change what was posted when i would crash.
If you could help explain this a bit better to me or if we could talk on discord it would be much appreciated.
after some testing and jank-ness i got it to work, I’ve tested leaving and crashing, works perfectly, just struggling to be able to test timing out because if i disable my internet to test the time out message it will disconnect both clients and i won’t be able to see if it works in chat