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_say( id )
{
new said[ 192 ];
read_args( said, charsmax( said ) );
remove_quotes( said );
new name[ 32 ];
get_user_name( id, name, charsmax( name ) );
for( new i = 0; i < sizeof g_Words; i++ )
{
if( containi( said, g_Words[ i ] ) )
client_print( 0, print_chat, "%s just said a nasty word ;-0", name );
}
return 0;
}
PS: tuty. you have to use || instead of &&
__________________