SA-MP Forums Archive
Global Chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Global Chat (/showthread.php?tid=240382)



Global Chat - GiS - 15.03.2011

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(); ??


Re: Global Chat - Marricio - 15.03.2011

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;
}



Re: Global Chat - GiS - 15.03.2011

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..


Re: Global Chat - Marricio - 15.03.2011

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


Re: Global Chat - blackwave - 15.03.2011

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;
}