I am trying to modify the basechat script, and change the colors. I found a couple of threads on here listing the available color hex codes.
Code I have changed:
Code:
void SendChatToAdmins(int from, const char[] message)
{
char szTag[32];
CS_GetClientClanTag(from, szTag, sizeof(szTag));
int fromAdmin = CheckCommandAccess(from, "sm_chat", ADMFLAG_CHAT);
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && (from == i || CheckCommandAccess(i, "sm_chat", ADMFLAG_CHAT)))
{
if (g_GameEngine == Engine_CSGO)
PrintToChat(i, "\x07[STAFF ONLY] %s | %N : %s ", szTag, from, message);
else
PrintToChat(i, "\x07[STAFF ONLY] %s | %N : %s ", szTag, from, message);
}
}
}
But when using this in-game, the result is:
It's cutting off the "STAFF" part, aswell as the color is dark blue and not red as it should be.
Code:
ONLY] [Owner] | painless : testing
I am new to scripting, and just asking for some guidance as to why this is not working properly.
Regards.
Solution:
Included multicolors, and used CPrintToChat and {darkred}