может это бред
но должно быть что то такое
OnPlayerText
Code
f(MuteAll > 0)
{
SendClientMessage(playerid, COLOR_SYSTEM_PW, "* Админ отключил общий чат. Используйте PM.");
return 1;
}
OnPLayerCommandText
Code
if(strcmp(cmd, "/chatoff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] <= 1337)
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
return 1;
}
MuteAll=10;
SendClientMessageToAll(COLOR_SYSTEM_GM, "* The admins have closed the public chat for now. You can still use PM and grouptalk.");
}
return 1;
}
if(strcmp(cmd, "/chaton", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] <= 1337)
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
return 1;
}
MuteAll=0;
SendClientMessageToAll(COLOR_SYSTEM_GM, "* The admins have opened the public chat again.");
}
return 1;
}