Help regardIng server advertisement
#1

Hello I was wondering if there is such code ,like I'll input the IP Address anyone who types that IP would be banned,but the IP wouldn't show in that particular chat..there is a server that is bothering me a lot .they are SAing again and again...

Help would be appreciated
Reply
#2

hmm Anti-Advertisement ?
PHP Code:
stock AntiAdv(playeridtext[])
{
    
// Anti Adv
    
new strR[255], is1=0r=0;
     while(
strlen(text[is1]))
     {
          if(
'0'<=text[is1]<='9')
          {
             new 
is2=is1+1p=0;
               while(
p==0)
              {
                   if(
'0'<=text[is2]<='9'&&strlen(text[is2]))
                   {
                   
is2++;
                }
                 else
                  {
                       
strmid(strR[r],text,is1,is2,255);
                       if(
strval(strR[r])<255r++;
                    
is1=is2;
                    
p=1;
                }
            }
        }
        
is1++;
     }
     if(
r>=4)
     {
          new 
strMy[255];
          
format(strMysizeof(strMy), "AdmWarn: %s is attempting to Server Advertise: %s"playernametext);
          
SendAdminMessage(COLOR_DARKRED1strMy);
           new 
pr2;
          for(new 
z=0;z<r;z++)
          {

               while((
pr2=strfind(text,strR[z],true))!=-1)
            {
                for(new 
i=pr2,j=pr2+strlen(strR[z]);i<j;i++)
                {
                    
text[i]='*';
                }
            }
          }
          return 
1;
     }
     return 
0;

If you own stunt server or something
Do this
On callback OnPlayerText
PHP Code:
if(AntiAdv(playeridparams)) return 1
Or if you have other type of chat just insert that code there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)