bunu dene...

PHP- Kodu:
#include <amxmodx>
#include <amxmisc>
#include <string>

#define PLUGIN "NoAds"
#define VERSION "0.5"
#define AUTHOR "AdaskoMX"

stock const advertising_words[][] = {
    
"https://",
    
"www.",
    
".com",
    
".net",
    
".org",
    
".ru",
    
".pl",
    
".de",
    
".co.uk",
    
".info"
}

stock const advertising_allowed[][] = {
    
"zal."
}

new 
adshostadsip;

public 
plugin_init() {
   
    
register_plugin(PLUGINVERSIONAUTHOR);
   
    
register_clcmd("say""hook_chat");
    
register_clcmd("say_team""hook_chat");
   
    
//register_cvar("amx_adspunish_mode","1")
    //register_cvar("amx_adsban_time","5")
    
adshost register_cvar("amx_adsaddress""")
    
adsip register_cvar("amx_adsip""")
}

public 
hook_chat(id)
{
    new 
temp[512], szArgs[512], said[512], adres[60], adresIP[40]
    
read_args(szArgs511)
   
    
get_pcvar_string(adshostadres60)
    
get_pcvar_string(adsipadresIP40)
    new 
len strlen(szArgs)
   
    new 
digitsperiodsposstartstopij
   
    
new szName[32]
    
get_user_name(idszName31)
    
    new 
bool:allowbool:ipbool:sprawdz;
   
    if(
len >= && szArgs[0] == '"' && szArgs[len 1] == '"'){
        
len -= 2;
    
copy(szArgslenszArgs[1]);
    }
    
    
temp szArgs;
    
said szArgs;
    
    for(
sizeof (advertising_words) ; i++){
    
stop 0;
        while((
pos containi(szArgs[stop], advertising_words[i])) != -1){
        
pos += stop;
        
start pos; while(start && szArgs[start 1] != ' 'start --
        
stop pos; while(stop len && szArgs[stop] != ' 'stop ++
        
        
allow false;
        for(
sizeof (advertising_allowed) ; ++){

            
periods containi(szArgs[start], advertising_allowed[j]);
            if(
periods stop start && periods >= 0){
                
allow true;
            }
        }
        
        if(!
allow){
            
copy(saidstartszArgs)
            
strcat(saidadres512)
            
strcat(saidszArgs[stop], 512)
            
szArgs said;
            
len strlen(szArgs);
            
stop start strlen(adres);
        }
    }
    }

    for(
leni++)
    {
        
sprawdz false;
        if(
isdigit(szArgs[i]))
        {
       if(
digits == 0start i;
       
digits++;
       if(
periods && digits 3){
        
ip true;
        
pos start;
       }
        }
        else if(
szArgs[i] == '.' || szArgs[i] == ':')
        {
            
periods++
        }
        else if(
szArgs[i] == ' ')
        {
       
periods 0;
       
digits 0;
        } else 
sprawdz true;
    if((
sprawdz || == len 1) && ip){
      
ip false;
        
      
start pos; while(start && szArgs[start 1] != ' 'start --
      
stop pos; while(stop len && szArgs[stop] != ' 'stop ++

      
      
copy(saidstartszArgs)
      
strcat(saidadresIP512)
      
strcat(saidszArgs[stop], 512)
      
szArgs said;
      
len strlen(szArgs);
        
        }
    }

    if(!
equal(saidtemp)){
    new 
cmd[10]
    
read_argv 0cmd9)
    
format(said512"^"%s^""said);
    
engclient_cmd id ,cmd said )
    return 
1;
    }
    
    return 
0;