need to use Protobuf's instead:
https://wiki.alliedmods.net/Protobuf
Instead of this:
PHP Code:
new Handle:hBf;
hBf = StartMessageOne("SayText2", player_index);
if (hBf != INVALID_HANDLE)
{
BfWriteByte(hBf, color_index);
BfWriteByte(hBf, 0);
if (gamemod == Game_CSGO)
{
// hackhackhack...
// CS:GO won't print any colors unless you not only start with standard color (1)
// like in other games, but also have a 'printable' character following it. We will just
// use an unused control code
BfWriteByte(hBf, 1);
BfWriteByte(hBf, 11);
}
BfWriteString(hBf, display_message);
EndMessage();
}
Something like this:
PHP Code:
new Handle:hBf;
hBf = StartMessageOne("SayText2", player_index);
if (hBf != INVALID_HANDLE)
{
if (GetUserMessageType() == UM_Protobuf)
{
PbSetInt(hBf, "command", color_index);
PbSetInt(hBf, "command", 0);
PbAddString(hBf, "params", display_message);
}
else
{
BfWriteByte(hBf, color_index);
BfWriteByte(hBf, 0);
BfWriteString(hBf, display_message);
}
EndMessage();
}