As far as I know SayText2 is player chat, SayText (used as player chat in ep1 and DoD:S btw) in CS:GO used as radio messages/other colored messages (just my guesses, never used it) and TextMsg as default messages (such as PrintToChat and others).
Code:
new UserMsg:TextMsg, UserMsg:SayText, UserMsg:SayText2
public OnPluginStart()
{
TextMsg = GetUserMessageId("TextMsg")
SayText = GetUserMessageId("SayText")
SayText2 = GetUserMessageId("SayText2")
HookUserMessage(TextMsg, UserMessagesHook, true)
HookUserMessage(SayText, UserMessagesHook, true)
HookUserMessage(SayText2, UserMessagesHook, true)
}
public Action:UserMessagesHook(UserMsg:msg_id, Handle:msg, const players[], playersNum, bool:reliable, bool:init)
{
decl String:buffer[PLATFORM_MAX_PATH], String:szMsgId[32]
for (new i; i < PbGetRepeatedFieldCount(msg, "params"); i++)
{
PbReadString(msg, "params", buffer, sizeof(buffer), i)
if (msg_id == TextMsg)
Format(szMsgId, sizeof(szMsgId), "TextMsg")
if (msg_id == SayText)
Format(szMsgId, sizeof(szMsgId), "SayText")
if (msg_id == SayText2)
Format(szMsgId, sizeof(szMsgId), "SayText2")
PrintCenterText(players[0], "msg_id %s, params %s", szMsgId, buffer)
LogMessage("msg_id %s, params %s", szMsgId, buffer)
}
}