Raised This Month: $ Target: $400
 0% 

[REQ] Block Certain Messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Syturio
BANNED
Join Date: Jul 2014
Location: Under your bed.
Old 08-12-2014 , 16:47   [REQ] Block Certain Messages
Reply With Quote #1

Is there any plugin out there that blocks certain messages on chat? for example i wanna block all players from saying "puta" in chat, no need for punishment, i just want it to not appear on chat.
Syturio is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 08-12-2014 , 17:31   Re: [REQ] Block Certain Messages
Reply With Quote #2

You can Try this ^^
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "author"

new const block[ ][ ] = {
    
"puta"
}

public 
plugin_init() {
    
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say","handle_say")
    
register_clcmd("say_team","handle_say")
    
}
public 
handle_say(id)
{
    new 
message[256]
    
read_args(messagecharsmax(message))
    
remove_quotes(message)
    for( new 
0;sizeof(block);i++ ) {
    if (
containi(messageblock[i] ) != -1)
    return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;

__________________

Last edited by Eagle07; 08-12-2014 at 17:32.
Eagle07 is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-12-2014 , 19:22   Re: [REQ] Block Certain Messages
Reply With Quote #3

There are many plugins doing that better.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Syturio
BANNED
Join Date: Jul 2014
Location: Under your bed.
Old 08-12-2014 , 19:35   Re: [REQ] Block Certain Messages
Reply With Quote #4

doesnt work, it blocks all chat not just "puta" basicly i cant write anything now
Syturio is offline
Syturio
BANNED
Join Date: Jul 2014
Location: Under your bed.
Old 08-12-2014 , 19:35   Re: [REQ] Block Certain Messages
Reply With Quote #5

Quote:
Originally Posted by Flick3rR View Post
There are many plugins doing that better.
can you tell me some plz
Syturio is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 08-12-2014 , 19:37   Re: [REQ] Block Certain Messages
Reply With Quote #6

Quote:
Originally Posted by Syturio View Post
doesnt work, it blocks all chat not just "puta" basicly i cant write anything now
Try with this

PHP Code:
public handle_say(id)
{
    new 
message[256]
    
read_args(messagecharsmax(message))
    
remove_quotes(message)
    for( new 
0;sizeof(block);i++ ) {
    if (
containi(messageblock[i] ) != -1)
    return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;

__________________
Eagle07 is offline
Syturio
BANNED
Join Date: Jul 2014
Location: Under your bed.
Old 08-12-2014 , 19:52   Re: [REQ] Block Certain Messages
Reply With Quote #7

Works 100%, thank you
Syturio 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 11:00.


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