Also, someone may find this handy, maybe you can include it, I don't know. This is a safe chat call you can use in OnChatMessage.
Code:
stock SafePrintToChat(client, const String:format[], any:...)
{
new String:newString[256];
new Handle:pack;
VFormat(newString, sizeof(newString), format, 3);
CreateDataTimer(0.001, Timer_SafePrintToChat, pack, TIMER_FLAG_NO_MAPCHANGE);
WritePackCell(pack, client);
WritePackString(pack, newString);
}
public Action:Timer_SafePrintToChat(Handle:timer, any:pack)
{
ResetPack(pack);
new client = ReadPackCell(pack);
new String:text[256];
ReadPackString(pack, text, sizeof(text));
PrintToChat(client, text);
return Plugin_Stop;
}