Author Topic: Disable Chat serverwide. required use to RTB Connect.  (Read 1957 times)

Read title.
An Example:



I want disable chat while playing in minigame for other player can focus play game racing, RPG, etc.
If player want talk something then use chat room or IM on RTB connect.
« Last Edit: January 05, 2013, 10:37:22 AM by Cubelands »


Well, you can set the max chatlength in the server to something obscenely small, or jack up flood protection, or something like that... Not quite sure which way is best.

I swear there was a "Disable chat" option in advanced options but it's not there anymore.

Oh well, setting Max Chat Lines 0 does the same thing.

make a script as Server_DiableChat or Script_DiableChat?
If someone Press T or Y (sorry chat is disable, please use RTB coonect)
« Last Edit: January 05, 2013, 10:37:32 AM by Cubelands »

Oh well, setting Max Chat Lines 0 does the same thing.
Options > Advanced

Edit: Oh never mind, you want it serverwide.
« Last Edit: January 05, 2013, 10:22:46 AM by Demian »


Code: [Select]
package nochat
{
function servercmdmessagesent(%client, %message)
{
if($chatdisabled && !%client.isadmin)
{
messageclient(%client,'',"\c6Only Admins may talk.");
return;
}
parent::servercmdmessagesent(%client, %message);
}
function servercmdteammessagesent(%client, %message)
{
if($chatdisabled && !%client.isadmin)
{
messageclient(%client,'',"\c6Only Admins may talk.");
return;
}
parent::servercmdteammessagesent(%client, %message);
}
};
activatepackage(nochat);

function servercmddisablechat(%client)
{
if(%client.issuperadmin)
{
if($chatdisabled)
{
messageclient(%client,'',"\c6Chat is already disabled.");
return;
}
else
{
messageall('',"\c4" @ %client.name @ "\c6 has disabled the chat. Only admins may talk now.");
$chatdisabled = 1;
}
}
}

function servercmdenablechat(%client)
{
if(%client.issuperadmin)
{
if(!$chatdisabled)
{
messageclient(%client,'',"\c6Chat is already enabled.");
return;
}
else
{
messageall('',"\c4" @ %client.name @ "\c6 has enabled the chat. Everyone may talk now.");
$chatdisabled = 0;
}
}
}

« Last Edit: January 05, 2013, 10:44:57 AM by Cubelands »

I have a client sided version which I made a while back. Basically on any server you can type /togglechat and it will be disabled. I know you were looking for server sided version but this will be useful if you are on other servers. Although I will say that making a server sided version may be a killer for a server because people do like to talk because the atmosphere can make people have more fun on a game.

http://dl.dropbox.com/u/19324878/Client_ToggleChat.zip

« Last Edit: January 05, 2013, 11:19:54 AM by Zeblote »