Closed asupreme1337 closed 3 years ago
Hey @asupreme1337 thank you for the report, do you possibly have any other addons that uses the chat installed?
Oh and knowing the gamemode would also help!
No other chat addons were installed.
My server uses a new gamemode - Among Us. I do not argue, perhaps it can create such an error, but why then it is in the general chat and with your addon... In a normal chat, everything is fine. I also looked at the code of this gamemod, but I didn't find any points that could conflict with your chat.
GM: https://steamcommunity.com/workshop/filedetails/?id=2308955070
Tested in DarkRP, sandbox & murder. It does seem to be from the gamemode. I'm going to look into it
Oh, that would be great. Thank you. I will wait for the fix.
So I've found the bug, it's in the gamemode you're using, specifically here: https://github.com/NotMyWing/GarrysModAmongUs/blob/3357ce9ee2ae4b963918d16416a8540ae4fcd80b/src/gamemodes/amongus/gamemode/cl_init.moon#L246
This line is responsible for dictating the color displayed in the chat except well if you're alive it stays a boolean and not a color hence the reason as to why every message you send is prepended by false
when you are alive.
If you have lua access on your server add this line to run on your clients to fix the problem temporarily:
hook.Remove("OnPlayerChat", "NMW AU DeadSay")
Maybe then it would be better to just edit this code a little to set the color for live players? This game mod is fully present on my server and I can edit it. I understand that this is not your job (to dig into this code), but if you can suggest a little fix for this, then it will be great. 😄
Unfortunately this gamemode is written in a language that compiles to lua (moonscript), and the source code on github only contains the moonscript files, I have no idea what the compiled code would look like but I have my suspicions that the file should be called the same so look for something called cl_init.lua
. In that file look for the hook called NMW AU DeadSay
and try replacing this line:
chat.AddText(prefixColor, prefixText, ply:GetPlayerColor():ToColor() or ply:GetColor(), ply:Nick(), Color(255, 255, 255), ": ", ply:IsDead() and Color(220, 220, 220), text)
With this one:
chat.AddText(prefixColor, prefixText, ply:GetPlayerColor():ToColor() or ply:GetColor(), ply:Nick(), Color(255, 255, 255), ": ", ply:IsDead() and Color(220, 220, 220) or Color(255, 255, 255), text)
Hope this help, I'm sorry to say I can't help much more, you could try opening an issue on their repo or leave a comment on their workshop page.
Yes, it really helped me. Thank you very much!
Hello, I installed this addon with the version from July 26 and I had a problem with the chat. When sending any text to the general ('say') chat, the inscription "false" appears before my text. I tested it with the original gmod chat and there was no such problem. Also, if I send the text in the "admins" tab, then there is also no such problem there.
I looked through the code, but also didn't find anything. I hope you can help :)