Raised This Month: $ Target: $400
 0% 

Get the Content of a Chat Message


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 01-05-2009 , 12:14   Re: Get the Content of a Chat Message
Reply With Quote #3

More efficient this way
PHP Code:
#include <amxmodx>

new g_Words[ ][ ] =
{
    
"noob",
    
"amxx",
    
"etc"
};

public 
plugin_init()
{
    
register_clcmd"say""hook_say" );
    
register_clcmd"say_team""hook_say" );
}

public 
hook_sayid )
{
    new 
said192 ];
    
read_argssaidcharsmaxsaid ) );
    
remove_quotessaid );
    
    new 
name32 ];
    
get_user_nameidnamecharsmaxname ) );
    
    for( new 
0sizeof g_Wordsi++ )
    {
        if( 
containisaidg_Words] ) )
            
client_print0print_chat"%s just said a nasty word ;-0"name );
    }
    return 
0;

PS: tuty. you have to use || instead of &&
__________________


Last edited by anakin_cstrike; 01-05-2009 at 12:16.
anakin_cstrike is offline
 



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 09:11.


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