Cod2 1.3 patch//
Sometimes I want to turn on/off chat with admin command on my server (exp: /rcon scr_gchat 1/0). How can I do it ? Thanks.
Printable View
Cod2 1.3 patch//
Sometimes I want to turn on/off chat with admin command on my server (exp: /rcon scr_gchat 1/0). How can I do it ? Thanks.
libcod:
PHP Code:
//server start:
{
setCvar("scr_gchat", "1"); //chat enabled default
}
codecallback_playercommand(args)
{
if (args.size >= 2 && (args[0] == "say" || args[1] == "say_team") && isDefined(args[1]))
{
if (!getCvarInt("scr_gchat"))
return; //chat disabled
}
self clientCommand();
}