Raised This Month: $ Target: $400
 0% 

How to hide players say?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GarbageBox
Senior Member
Join Date: Feb 2010
Old 07-30-2010 , 10:09   How to hide players say?
Reply With Quote #1

I want a code that can hide players say.
That because my friend server need use say to register, so he tell me he want add a code in the sma and that can hide players say.
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 07-30-2010 , 11:03   Re: How to hide players say?
Reply With Quote #2

Try something like this

register_clcmd("say","say_check")
register_clcmd("say_team","say_check")

public say_check(id)
{
if(!say_allowed(id)) return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
__________________

Jack86 is offline
GarbageBox
Senior Member
Join Date: Feb 2010
Old 08-01-2010 , 04:28   Re: How to hide players say?
Reply With Quote #3

When I try to convert the amxx, it show me undefined symbol "say_allowed".
How to fix it?
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
portocala
Member
Join Date: Jun 2010
Old 08-01-2010 , 04:44   Re: How to hide players say?
Reply With Quote #4

Do you want to hide all the chat ? If yes, do:

Code:
register_clcmd("say","say_check");
register_clcmd("say_team","say_check");

public say_check(id)
{
  return PLUGIN_HANDLED;
}
Or, if you want to hide only texts which contain "register":

Code:
register_clcmd("say","say_check");
register_clcmd("say_team","say_check");

public say_check(id)
{
  new args[128];
  read_args(args, 127);
  remove_quotes(args);

  if(containi(args, "register") !=-1) return PLUGIN_HANDLED;

  return PLUGIN_CONTINUE;
}
Not verified. But this is it.
portocala is offline
GarbageBox
Senior Member
Join Date: Feb 2010
Old 08-01-2010 , 05:14   Re: How to hide players say?
Reply With Quote #5

He told me he could not understand how to add the code correctly.
He sent a file to me and said he wanted an example of admin_check.sma
Can you add the code inside?
Because I try to add the code but did not hide the players said /admin.
Attached Files
File Type: sma Get Plugin or Get Source (admin_check.sma - 583 views - 1.8 KB)
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 08-01-2010 , 07:09   Re: How to hide players say?
Reply With Quote #6

PHP Code:
public handle_say(id) {
    new 
said[192]
    
read_args(said,192)
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/admin") != -)
        
set_task(0.1,"print_adminlist",id)
    return 
PLUGIN_CONTINUE

Code:
return PLUGIN_CONTINUE
is the result returned by public function and
Code:
 return PLUGIN_HANDLED
pauses the "say" command if the specified is said.
So use HANDLED.

Last edited by SpeeDeeR; 08-01-2010 at 07:13.
SpeeDeeR is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-01-2010 , 08:00   Re: How to hide players say?
Reply With Quote #7

If i am not wrong, you should use return PLUGIN_HANDLED_MAIN to block the say.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
GarbageBox
Senior Member
Join Date: Feb 2010
Old 08-01-2010 , 08:36   Re: How to hide players say?
Reply With Quote #8

i have tried return PLUGIN_HANDLED & return PLUGIN_HANDLED_MAIN, but it's still show /admin.
What's the problem?
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 08-01-2010 , 08:43   Re: How to hide players say?
Reply With Quote #9

Change this in your plugin.

PHP Code:
public handle_say(id) {
    new 
said[192]
    
read_args(said,192)
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/admin") != -) {
        
set_task(0.1,"print_adminlist",id)
        
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-01-2010 , 09:06   Re: How to hide players say?
Reply With Quote #10

PHP Code:
public handle_say(id
{
    static 
szSaid16 ];
    
read_argsszSaid charsmaxszSaid ) );
    
parseszSaid szSaid charsmaxszSaid ) );
    
    if( 
equaliszSaid "who") || equaliszSaid "admin") || equaliszSaid "/admin") ) 
    {
        
print_adminlistid );
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE

__________________
Bugsy 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 00:13.


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