Block Chat -Script
#5

//Top of script:
Код:
new bool:ChatBlocked;
//OnPlayerText:
Код:
public OnPlayerText(playerid, text[])
{
  if(ChatBlocked == true && !IsPlayerAdmin(playerid))
  {
    SendClientMessage(playerid, 0xFF0000AA, "Sorry, the admins blocked the chat");
    return 0;
  }
  return 1;
}
//OnPlayerCommandText:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/blockchat", true)==0 && IsPlayerAdmin(playerid))
  {
    if(ChatBlocked == false)
    {
      ChatBlocked = true;
      SendClientMessageToAll(0xFF0000AA, "The Admins blocked the chat!");
    }
    else
    {
      ChatBlocked = false;
      SendClientMessageToAll(0x00FF00AA, "The Admins unblocked the chat!");
    }
    return 1;
  }
  return 0;
}
Reply


Messages In This Thread
Block Chat -Script - by kacxper - 16.04.2009, 18:12
Re: Block Chat -Script - by Rks25 - 16.04.2009, 18:35
Re: Block Chat -Script - by kacxper - 16.04.2009, 20:21
Re: Block Chat -Script - by OmeRinG - 16.04.2009, 20:27
Re: Block Chat -Script - by Sandra18[NL] - 16.04.2009, 20:36
Re: Block Chat -Script - by kacxper - 16.04.2009, 21:29
Re: Block Chat -Script - by Sandra18[NL] - 16.04.2009, 21:35
Re: Block Chat -Script - by kacxper - 16.04.2009, 21:35

Forum Jump:


Users browsing this thread: 2 Guest(s)