Clear Chat?

Posted by SuperInky
So I made my own chat system and it works and stuff, but I was wondering if either a clear chat command exists or can be added, mostly because I've noticed that a person that recently connects to a server won't be able to see messages prior to the moment they joined. Any help would be appreciated

Replies (1)

Last message on 14 Oct 2021

Size43 (Administrator) on 14 Oct 2021, 19:36:00
If you've implemented your own chat system, you can implement this yourself fairly quickly, as follows: Keep a global variable, say global.chat_start = 0. Every time you want to clear the chat, you set this variable to gms_chat_num(). When drawing the chat, instead of starting with message 0, you start with the message at index `global.chat_start`. This way, you won't draw any of the old messages after 'clearing' the chat.