Originally Posted by enderandrew
Could you do syntax highlighting with this for connect messages in a given color, errors in another color, etc?
Hi again, idk why i always meet you in so many different Threads ^^
Ime not sure, but if i understand correctly, you do can set the Message Color of everything.
Instead of hooking out the connect message and then reprinting it, this should also do the trick(and is a bit simpler):
SetConsolePrintColor(RED IDK you know what i mean)
public action Frame()
SetConsolePrintColor(Default Color Here)
This isent failsafe since every message send in that frame does get colored, but yea.
The only other Way i could think of is hooking the Server Console Print, its propably possible todo this with PTAH or DHooks, here is some Pseudocode:
PTaH(PTaH_ServerConsolePrint, Hook, ServerConsolePrint);
public Action ServerConsolePrint(const char sMessage, LoggingSeverity severity)
if(StrCmp(sMessage, "connected")) // Message to highlight goes here
ColorPrintToServer(BACKGROUND COLOR, FOREGROUND COLOR, sMessage)