#pragma semicolon 1
#include <usermessages>
public void OnPluginStart()
{
HookUserMessage(GetUserMessageId("TextMsg"), ChatMsgHook, true);
}
public Action ChatMsgHook(UserMsg msg_id, Handle msg, const int[] players, int playersNum, bool reliable, bool init)
{
static char sBuffer[PLATFORM_MAX_PATH];
if(BfReadByte(msg)%2 == 0 // TextMsg: 1 и 3 - чат, 2 - консоль, 4 - центр экрана
|| BfReadString(msg, sBuffer, sizeof(sBuffer), true) < 40
|| StrContains(sBuffer, "VAC is disabled - No connection to Steam") == -1)
return Plugin_Continue;
return Plugin_Handled;
}