[Ajuda] Com um Anti palavrхes
#2

Bom nгo mudei nada! Apenas identei os cуdigos e coloquei ambos em ordem. Teste e responda se funcionou do jeito que queria ou nгo.

PHP код:
    new stringp1,stringp2,stringp3[50],sz[128];
    
format(sz,128,"%s",text);
    while(
stringp2<=strlen(sz))
    {
        for(new 
d=0;d<MAX_PALAVROES;d++)
        {
            
stringp1=strfind(sz,Palavroes[d],true,stringp2);
            if(
stringp1!=-1&&stringp1==stringp2)
            {
                
strdel(sz,stringp1,stringp1+strlen(Palavroes[d]));
                for(new 
h=0;h<strlen(Palavroes[d]);h++)
                {
                    
strcat(stringp3,"*");
                }
                
strins(sz,stringp3,stringp1,256);
                
strdel(stringp3,0,strlen(stringp3));
            }
        }
        
stringp2++;
    }
    
SendPlayerMessageToAll(playerid,sz);

    if(
Stats[playerid][GANGID]==0)
    {
        
format(string,sizeof(string),"(id:%d): %s",playerid,text);
        for(new 
i=0TOTALPLAYERSi++) if(PlayerInGuerra[i]==0SendPlayerMessageToPlayer(i,playerid,string);
        return 
0;
    }
    else if(
Stats[playerid][GANGID]>1)
    {
        
format(string,sizeof(string),"(id:%d): %s",playerid,text);
        for(new 
i=0TOTALPLAYERSi++) if(PlayerInGuerra[i]==0SendPlayerMessageToPlayer(i,playerid,string);
        return 
0;
    }
    else if(
Stats[playerid][GANGID]==1)
    {
        
format(string,sizeof(string),"(id:%d) %s: %s",playerid,gangNames[Stats[playerid][GANGIDONLINE]],text);
        for(new 
i=0TOTALPLAYERSi++) if(PlayerInGuerra[i]==0SendPlayerMessageToPlayer(i,playerid,string);
        return 
0;
    } 
Reply


Messages In This Thread
Com um Anti palavrхes - by JoNhKaKa - 25.11.2014, 20:55
Re: Com um Anti palavrхes - by [BOPE]Seu._.Madruga - 25.11.2014, 21:07
Respuesta: Com um Anti palavrхes - by JoNhKaKa - 25.11.2014, 22:56
Re: Com um Anti palavrхes - by PedexM - 25.11.2014, 22:59
Respuesta: Re: Com um Anti palavrхes - by JoNhKaKa - 25.11.2014, 23:12
Re: Respuesta: Re: Com um Anti palavrхes - by Maklister - 26.11.2014, 00:11
AW: Com um Anti palavrхes - by rogerioexper - 26.11.2014, 02:42
Re: Com um Anti palavrхes - by n0minal - 26.11.2014, 03:09
Re: Com um Anti palavrхes - by AlisonUFPB - 26.11.2014, 17:13

Forum Jump:


Users browsing this thread: 1 Guest(s)