13.03.2010, 05:59
pawn Код:
//Above Ongamemodeinit:
new ChatDisabled;
public OnGameModeInit()
{
ChatDisabled = 0; //Chat enabled
return 1;
}
else if(strcmp(cmd, "/chat", true) == 0) {
if (ChatDisabled == 0) {
ChatDisabled = 1; //Chat off
return 1;
}
if (ChatDisabled == 1) {
ChatDisabled = 0; //Chat on
return 1;
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(ChatDisabled == 1)
{
SendClientMessage(playerid, COLOR_YOURCOLOR, "The chat is currently disabled by an admin.");
return 0;
}
return 1;
}