Raised This Month: $ Target: $400
 0% 

hide commands from chat (like /cp & /tp)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lqlqlq
Senior Member
Join Date: Jan 2008
Old 06-04-2011 , 19:01   hide commands from chat (like /cp & /tp)
Reply With Quote #1

Hi,
I have some plugins using colorchat, but my code wont stop say commands from chat and maybe reason is colorchat.
Plugin i use:
Code:
#include <amxmodx>

#define VERSION   "1.0"

public plugin_init()
{
    register_plugin("blokcom", VERSION, "kyky")
   
    register_clcmd("say /ljstats", "show")
    register_clcmd("say /stats", "show")
    register_clcmd("say /cp", "show")
    register_clcmd("say /tp", "show")
    register_clcmd("say /menu", "show")
    register_clcmd("say /gocheck", "show")
    register_clcmd("say /weapons", "show")
    register_clcmd("say /respawn", "show")
    register_clcmd("say /reset", "show")
    register_clcmd("say /stuck", "show")
    register_clcmd("say /checkpoint", "show")
}

public show(id)
{

    return PLUGIN_HANDLED_MAIN
}
Please give me a good code to block this commands.
Thanks!
lqlqlq is offline
slice231`SD
Senior Member
Join Date: Mar 2009
Location: Location: Location:
Old 06-04-2011 , 19:37   Re: hide commands from chat (like /cp & /tp)
Reply With Quote #2

PHP Code:
#include <amxmodx>

#define VERSION   "1.0"

public plugin_init()
{
    
register_plugin("blokcom"VERSION"kyky")
   
    
register_clcmd("say /ljstats""show")
    
register_clcmd("say /stats""show")
    
register_clcmd("say /cp""show")
    
register_clcmd("say /tp""show")
    
register_clcmd("say /menu""show")
    
register_clcmd("say /gocheck""show")
    
register_clcmd("say /weapons""show")
    
register_clcmd("say /respawn""show")
    
register_clcmd("say /reset""show")
    
register_clcmd("say /stuck""show")
    
register_clcmd("say /checkpoint""show")
}

public 
say_check(id)
{
  return 
PLUGIN_HANDLED;

hides all commands
if you want to hide certain commands use if( ( containi or if( equali whatever floats your boat
__________________

slice231`SD is offline
lqlqlq
Senior Member
Join Date: Jan 2008
Old 06-04-2011 , 19:48   Re: hide commands from chat (like /cp & /tp)
Reply With Quote #3

Quote:
Originally Posted by slice231`SD View Post
PHP Code:
#include <amxmodx>

#define VERSION   "1.0"

public plugin_init()
{
    
register_plugin("blokcom"VERSION"kyky")
   
    
register_clcmd("say /ljstats""show")
    
register_clcmd("say /stats""show")
    
register_clcmd("say /cp""show")
    
register_clcmd("say /tp""show")
    
register_clcmd("say /menu""show")
    
register_clcmd("say /gocheck""show")
    
register_clcmd("say /weapons""show")
    
register_clcmd("say /respawn""show")
    
register_clcmd("say /reset""show")
    
register_clcmd("say /stuck""show")
    
register_clcmd("say /checkpoint""show")
}

public 
say_check(id)
{
  return 
PLUGIN_HANDLED;

hides all commands
if you want to hide certain commands use if( ( containi or if( equali whatever floats your boat
your code not working...
lqlqlq is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-04-2011 , 20:01   Re: hide commands from chat (like /cp & /tp)
Reply With Quote #4

PHP Code:
#include <amxmodx>

#define VERSION "0.0.1"
#define PLUGIN "Hide Chats Cmds"

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
register_clcmd("say""HostSay")
    
register_clcmd("say_team""HostSay")
}

public 
HostSayid )
{
    static 
szSaid[3]
    
read_args(szSaidcharsmax(szSaid))
    
remove_quotes(szSaid)
    if( 
szSaid[0] == '/' )
    {
        return 
PLUGIN_HANDLED_MAIN
    
}
    return 
PLUGIN_CONTINUE

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
lqlqlq
Senior Member
Join Date: Jan 2008
Old 06-04-2011 , 20:05   Re: hide commands from chat (like /cp & /tp)
Reply With Quote #5

Connor nice try, but not working...
I moved plugins below custom, but no work...
Other try ?
lqlqlq is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-04-2011 , 20:42   Re: hide commands from chat (like /cp & /tp)
Reply With Quote #6

It works, you have some chat plugin like admin chat color or admin listen or whatever that remake the chat.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
lqlqlq
Senior Member
Join Date: Jan 2008
Old 06-04-2011 , 20:44   Re: hide commands from chat (like /cp & /tp)
Reply With Quote #7

Yes I believe it works, but want an alternative without removing admin chat colors.
lqlqlq 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 15:28.


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