Ok Ive figured out whats wrong thanks to ColorChat by ConnorMcLeod ( thank you! ) The problem was with the way chat message was send. Broadcaster id and Receiver id where mixed up and when message was to every player colors where screwed up.
Fixed code:
PHP Code:
ChatMessage(iReceiver, const sMessage[], ...)
{
new iBroadcaster, MSG_Type, sMsg[192], sFinal[192], sTag[32];
get_pcvar_string(gCvarTag, sTag, 191);
if(iReceiver== 0)
{
MSG_Type = MSG_ALL;
iBroadcaster = BroadcasterFind();
} else {
MSG_Type = MSG_ONE;
iBroadcaster = iReceiver;
}
vformat(sMsg, charsmax(sMsg), sMessage, 3);
format(sFinal, charsmax(sFinal), "!t%s %s", sTag, sMsg);
ColorsReplace(sFinal, charsmax(sFinal));
message_begin(MSG_Type, gSayText, _, iReceiver);
write_byte(iBroadcaster);
write_string(sFinal);
message_end();
}
BroadcasterFind()
{
new i = 1;
while(i <= gMaxSlots)
{
if(is_user_connected(i) && !is_user_bot(i)) { return i; }
}
return -1;
}