PHP Code:
#include <amxmodx>
new g_pFreezeTime;
public plugin_init()
{
register_plugin("O", "M", "G");
g_pFreezeTime = get_cvar_pointer("mp_freezetime");
register_clcmd("say", "ClientCommand_Say");
}
public ClientCommand_Say(iClient)
{
if(get_pcvar_num(g_cFreezeTime) <= 0)
{
client_print(iClient, print_chat, "* Chat is blocked!");
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
Not tested, though.
When do you want to block the chat?
After the freezetime passes or if the 'mp_freezetime' cvar value is lower / equal to 0?
__________________