Umm the chat isn't supposed to show up
This is what i changed in my code to check the chattext before it get's sent.
Code:
if (Main.inputTextEnter && Main.chatRelease)
{
if (Main.chatText != "" && Modclass.onChat(Main.chatText)) //this
{
NetMessage.SendData(25, -1, -1, Main.chatText, Main.myPlayer, 0f, 0f, 0f, 0);
}
Main.chatText = "";
Main.chatMode = false;
Main.chatRelease = false;
Main.player[Main.myPlayer].releaseHook = false;
Main.player[Main.myPlayer].releaseThrow = false;
Main.PlaySound(11, -1, -1, 1);
}
Modclass.onChat checks my chattext.
If there's a dot like in .noclip,
it checks what command it is(after the dot) and executes it, then returns false.
If there is no dot at the beginning it returns true.
So if there is a dot it doesnt send it and executes your command, if there is none it just sends it.