Global Chat
#1

I am working on a roleplay server so is it possible to turn off the normal chat? Right now I got the normal (global) chat and the one I scripted like "Name says: abc".

Is there any command like DisableGlobalChat(); ??
Reply
#2

use a var..

pawn Code:
// at the top
new GlobalChat;
forward DisableGlobalChat();
forward EnableGlobalChat();

// somewhere not inside a callback or function
public DisableGlobalChat()
{
      GlobalChat = 0;
}

// somewhere not inside a function
public EnableGlobalChat()
{
      GlobalChat = 0;
}
Reply
#3

What are you talking? I need a function to turn the global chat off, you know the normal chat that exists when you haven't done anything on the script..
Reply
#4

Why you dont learn some scripting yourself? I confused -.-
pawn Code:
public OnPlayerText(playerid,text[])
{
        return 0;
}
THAT SIMPLE
Reply
#5

pawn Code:
new bool:global = false; // before GameModeInit / FilterScriptInit
pawn Code:
if(!strcmp(cmdtext, "/ed", true)) // Enable / Disable
{
      if(global == false)
      {
           global = true;
      }
      else
      {
           global = false;
      }
      return 1;
}
pawn Code:
public OnPlayerText(playerid,text[])
{
        if(global == true) return 0;
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)