Anti-IP Advertisement
#5

PHP код:
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 
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;

Код:
public OnPlayerText(playerid, text[])
{
    if(AntiAdv(playerid, text)) return 0;
   return 0;
}
maybe i helped you
Reply


Messages In This Thread
Anti-IP Advertisement - by TadePoleMG - 04.05.2018, 12:13
Re: Anti-IP Advertisement - by JesterlJoker - 04.05.2018, 12:19
Re: Anti-IP Advertisement - by Zeth - 04.05.2018, 12:30
Re: Anti-IP Advertisement - by jasperschellekens - 04.05.2018, 13:39
Re: Anti-IP Advertisement - by CrystalGamer - 04.05.2018, 13:59
Re: Anti-IP Advertisement - by TadePoleMG - 04.05.2018, 15:22
Re: Anti-IP Advertisement - by jasperschellekens - 04.05.2018, 18:57

Forum Jump:


Users browsing this thread: 2 Guest(s)