Raised This Month: $12 Target: $400
 3% 

[ANY] Hide Any Chat Triggers


Post New Thread Reply   
 
Thread Tools Display Modes
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 01-15-2016 , 09:52   Re: [ANY] Hide Any Chat Triggers
Reply With Quote #21

Oh, thanks for the quick reply, see this script, it simply replace the "!" or "." with "/" making the command silent:

PHP Code:
#pragma semicolon 1
#include <sourcemod>

public Plugin:myinfo =
{
    
name "blockcmds",
    
author "someauthor",
    
description "",
    
version "1.0",
    
url ""
}

public 
OnPluginStart()
{
    
AddCommandListener(Cmd_Say"say");
    
AddCommandListener(Cmd_Say"say_team");
}

public 
Action:Cmd_Say(client, const String:command[], argc)
{
    
decl String:chat_text[512];
    
GetCmdArgString(chat_textsizeof(chat_text));
    
StripQuotes(chat_text);
    if 
    (
        
StrEqual(chat_text"!test1"
        || 
StrEqual(chat_text"!test2"
        
        || 
StrEqual(chat_text".test1"
        || 
StrEqual(chat_text".test2"
    )
    {
        
ReplaceString(chat_textsizeof(chat_text), "!""/");
        
ReplaceString(chat_textsizeof(chat_text), ".""/");
        return 
Plugin_Handled;
    }
    
    return 
Plugin_Continue;

My question is, in this new version of sourcemod, 1.7, how can I add a call system to a .txt file to easly add commands there to do the same as this, just to avoid to compile every time that I want to add some command...
joao7yt is offline
EricTheDon
Junior Member
Join Date: Sep 2016
Old 01-28-2017 , 02:43   Re: [ANY] Hide Any Chat Triggers
Reply With Quote #22

Anyone know why when using https://forums.alliedmods.net/showpo...postcount=1047 with this plugin breaks the plugin. The chat triggers won't register anymore?
EricTheDon is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 05-13-2017 , 05:49   Re: [ANY] Hide Any Chat Triggers
Reply With Quote #23

I know this isn't what this plugin is designed to do, but I've found it's rather effective at combating Lmaobox spam. Because it looks for and removes exact phrases, you can put in the lines below in the config file and it prevents them from being shown in chat!
Code:
​WWW.LMAOBOX.NET - BEST FREE TF2 HACK!
GET GOOD, GET LMAOBOX!
LMAO​BOX​ - WAY TO THE TOP
WWW.LMAOBOX.NET
Of course this does not ban them or prevent them from using their hack, so you'd want SMAC or the like, but with this you can at least prevent them from spamming the chat.
__________________

Last edited by Werewolf_UK; 05-13-2017 at 05:49.
Werewolf_UK is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-13-2017 , 16:01   Re: [ANY] Hide Any Chat Triggers
Reply With Quote #24

Quote:
Originally Posted by sgt_phsco View Post
I know this isn't what this plugin is designed to do, but I've found it's rather effective at combating Lmaobox spam. Because it looks for and removes exact phrases, you can put in the lines below in the config file and it prevents them from being shown in chat!

Of course this does not ban them or prevent them from using their hack, so you'd want SMAC or the like, but with this you can at least prevent them from spamming the chat.
https://forums.alliedmods.net/showthread.php?p=2080526
__________________

Last edited by ddhoward; 05-13-2017 at 16:01.
ddhoward is offline
A_RM
AlliedModders Donor
Join Date: Oct 2016
Location: Canada
Old 09-12-2017 , 23:55   Re: [ANY] Hide Any Chat Triggers
Reply With Quote #25

This still working for anyone? Won't seem to work for me unfortunately.
A_RM is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode