[Ajuda] Com um Anti palavrхes
#1

Ola, bom eu queria pedir que alguйm me ajude com um sistema de Anti Palavrхes que eu encontrei na net. No GM que tenho aqui, tem esse sistema de chat.

pawn Код:
if(Stats[playerid][GANGID]==0)
        {
            format(string,sizeof(string),"(id:%d): %s",playerid,text);
            for(new i=0; i < TOTALPLAYERS; i++) if(PlayerInGuerra[i]==0) SendPlayerMessageToPlayer(i,playerid,string);
            //format(textirc,256,"12%s(id:%d) %s",PlayerName(playerid),playerid,text);
            //IRC_GroupSay(GroupIDIRC[0],EchoChan,textirc);
            return 0;
        }
        else if(Stats[playerid][GANGID]>1)
        {
            format(string,sizeof(string),"(id:%d): %s",playerid,text);
            for(new i=0; i < TOTALPLAYERS; i++) if(PlayerInGuerra[i]==0) SendPlayerMessageToPlayer(i,playerid,string);
            //format(textirc,256,"12%s(id:%d): %s",PlayerName(playerid),playerid,gangNames[Stats[playerid][GANGIDONLINE]],text);
            //IRC_GroupSay(GroupIDIRC[0],EchoChan,textirc);
            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=0; i < TOTALPLAYERS; i++) if(PlayerInGuerra[i]==0) SendPlayerMessageToPlayer(i,playerid,string);
            //format(textirc,256,"12%s(id:%d) %s: %s",PlayerName(playerid),playerid,gangNames[Stats[playerid][GANGIDONLINE]],text);
            //IRC_GroupSay(GroupIDIRC[0],EchoChan,textirc);
            return 0;
        }
E eu queria adaptar esse sistema de Anti Palavrхes nesse sistema de chat.

pawn Код:
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);
Alguйm poderia me ajudar por favor, ficaria muito grato!
Reply
#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
#3

Nгo funcionou, tipo, o sistema do Anti Palavreado tem:
pawn Код:
format(sz,128,"%s",text);
O servidor tem:
pawn Код:
format(string,sizeof(string),"(id:%d): %s",playerid,text);
e:
pawn Код:
format(string,sizeof(string),"(id:%d): %s",playerid,text);
e:
pawn Код:
format(string,sizeof(string),"(id:%d) %s: %s",playerid,gangNames[Stats[playerid][GANGIDONLINE]],text);
E dentro do servidor, quando o player digita no chat, aparece duas mensagens, ex:
Player1(id:0): Que *****.
Player1(id:0): Que bosta.


por isso eu queria adaptar o chat do Anti palavreado no Chat que jб tem no servidor.
Reply
#4

Exclua o seu. ou veja o Return se tiver 1 coloque 0.

Cara se olhar os ъltimos 5 Tуpicos, 4 Sгo seus, eu sei que vocк quer sу tirar dъvidas,mas cara pra que tudo isso? e
sу vem com ajudas de cуdigos desatualizados e de GF.
Reply
#5

Vou ver o que faзo com o Anti Palavrхes.

Quote:
Originally Posted by PedexM
Посмотреть сообщение
Cara se olhar os ъltimos 5 Tуpicos, 4 Sгo seus, eu sei que vocк quer sу tirar dъvidas,mas cara pra que tudo isso? e
sу vem com ajudas de cуdigos desatualizados e de GF.
Sim, os ъltimos tуpicos podem ser meus, mas jб esta ai a mais de 1 semana e ninguйm olha, e sem querer ofender ninguйm, e me desculpe se vou ser ignorante nisso, mas os cara teve a intenзгo de ver que eles sгo meus, e postar que fiz o flood, porque nгo podem entrar e ver se conseguem me ajudar, em vez de postar que fiz o flood, e tambйm se nгo for assim ninguйm olha, eu sempre entro aqui, e vejo que muitos olham o dos outros mas nгo olham o meu, me desculpe entгo..
Reply
#6

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
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;
    } 
Leo seu lindo arruma esse code ai :@ <3

Quote:
Originally Posted by JoNhKaKa
Посмотреть сообщение
Vou ver o que faзo com o Anti Palavrхes.



Sim, os ъltimos tуpicos podem ser meus, mas jб esta ai a mais de 1 semana e ninguйm olha, e sem querer ofender ninguйm, e me desculpe se vou ser ignorante nisso, mas os cara teve a intenзгo de ver que eles sгo meus, e postar que fiz o flood, porque nгo podem entrar e ver se conseguem me ajudar, em vez de postar que fiz o flood, e tambйm se nгo for assim ninguйm olha, eu sempre entro aqui, e vejo que muitos olham o dos outros mas nгo olham o meu, me desculpe entгo..
Fera nгo й isso .. crise de existкncia ?

Vocк esta simplesmente copiando e colando o code pra alguйm vim e arrumar .. nгo й que ninguйm nгo quer ajudar e que й foda ...

posta sua new sz do ultimo code
Reply
#7

USA O MEU AI SE
FS BY-ROGERIOEXPER


PHP код:
/*Brasil Life PLay Owna 108.61.40.173:7780
Nao retire os creditos By: Rogerio Leve na boa use e abuse
Fs antihack 2.0 100% ok
*/

//=== [Includes] ===
#include <a_samp>
#include <core>
#include <float>
#include <dini>
#include <a_objects>
#include <time>
#include <string>
#include <file>
#include <a_npc>

//=== [Defines Cores] ===
#define ORANGE          0xFF8C00AA
#define GREEN           0x33AA33AA
#define YELLOW          0xFFFF00AA
#define HOMER           0xFF0000AA
#define BLUE            0x33CCFFAA
#define ABLUE           0x2641FEAA
#define COLOR_GREEN 0x00D900C8
#define COR_VERDE_FLUORESCENTE 0x00F600AA
#define COR_AZULNEUTRO 0xABCDEF01
#define COR_AZUL_PISCINA 0x00FFFFAA
#define COR_VERMELHO 0xFF0000FF
#define COR_VERDE_ABACATE 0xB6FC69FF
#define COR_AMARELO 0xFFFF00AA
#define COR_BRANCO 0xFFFFFFAA
#define COR_CINZA_AZUL 0x456EAF67
#define COR_AZUL 0x0000FFAA
#define COR_AZULMEDIO 0x63AFF00A
#define COR_CINZA 0xAFAFAFAA
#define COR_ROXO 0x9900FFAA
#define COR_VIOLETA 0x9955DEEE
#define COR_MARROM 0x993300AA
#define COR_MARROMCLARO 0x99934EFA
#define COR_LARANJA 0xFF9933AA
#define COR_ROSA_DANONE 0xFF66FFAA
#define COR_AZULCLARO 0x33CCFFAA
#define COR_AMARELOCLARO 0xFFFFCCAA
//========== forward ================
forward desxacalaca(playerid);
forward CheckHacks();
forward CheckPing(playerid);
forward AntiSH(playerid);

//==========sertasdefines============
#define SCM SendClientMessage
#define MAXPING 1200
#define FILTERSCRIPT
#define RONALDO_LOL 432

#define MAX_CONNECTIONS_FROM_IP     1
//========= news ===================
new TimerFDP;
forward FDP(playerid);
//new stringx[MAX_PLAYERS];
//new playerboot[40]; // Variбvel que irб servir para pegar o nome do player

new Palavroes[][128] = {
"bunda","porra","cъ","buceta","fuder","caralho","puta","gay","viado","fdp","fdm","nub","lixo","rola","pinto","noob","bando","poha","pohha","f-d-p","f d p","nuub","Fdm","cъ","podre",
"burrooo","corno","idiota","boceta","caralho","merda","CHUPA","PAЪ","FDP"

};
new 
Avisos[MAX_PLAYERS];
//new nome[MAX_PLAYER_NAME];

new AntiNomeBot[][] =
{
"con.","com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7",
"lpt8","lpt9","nul","clock$","aux","prn","con","Carl","Rocky","Pepe","Arnoldo","SgtPepper","Pepsi""Pepno","Azucar",
"Vino_Toro","Zoquete","Pacman","Batman","AquilesBrinco","Manfrey","Sopapeala","Papirola","Sony","[ViP]Labrik","Justin_Bieber",
"[MT]Lavis","Gil_Henrique","Server_Lixo","Justin_Biba","Justin_Viadinho","Advanced_Lixo","anonymous_hacker","hacker","BoB_CrazzY","CrazzY_BoB","Server_noob","noob"
};

new 
IP[432][] =
{
":7788",
":7798",
":7777",
":7778",
":7776",
":7775",
":7774",
":7773",
":7772",
":7771",
":7770",
":5555",
":8888",
":8090",
":6969",
":7780",
":7781",
":7782",
":7783",
":7784",
":7785",
":7786",
":7787",
":7788",
":7789",
":7790",
":7791",
":7792",
":7793",
":7794",
":7795",
":7796",
":7797",
":7798",
":7799",
":7800",
"127.",
"189.",
"188.",
"198.",
"199.",
"171.",
"211.",
"64.",
"66.",
"68.",
"67.",
"65.",
"183.",
"187.",
"201.",
"211.",
"200.",
"141.",
"217.",
"213.",
"80.",
"8080.",
"127 .",
"189 .",
"188 .",
"198 .",
"199 .",
"171 .",
"211 .",
"64 .",
"66 .",
"68 .",
"67 .",
"65 .",
"183 .",
"187 .",
"201 .",
"211 .",
"200 .",
"141 .",
"217 .",
"213 .",
"80 .",
"8080 .",
"189.1.169",
"35:7777",
"1.169.35",
"189.1",
"88",
"77",
"7777",
"77",
"189.1.169.35:7777",
"200.",
"200 .",
"189.",
"189 .",
"201.",
"201 .",
"200.1",
"200.1",
"200 . 1",
"200. 1",
"200 .1",
"201.1",
"201 . 1",
"201. 1",
"201 .1",
"208.1",
"208. 1",
"208 .1",
"208 . 1",
"69.1",
"69. 1",
"69 . 1",
"69 .1",
"189.1",
"189. 1",
"189 .1",
"189 . 1",
"66.7",
"66. 7",
"66 .7",
"66 . 7",
"177.1",
"177. 1",
"177 .1",
"177 . 1",
"109 .",
"115 .",
"119 .",
"128 .",
"133 .",
"140 .",
"149 .",
"65 .",
"32 .",
"66 .",
":3127",
"150 .",
"156 .",
"167 .",
"173 .",
"174 .",
"184 .",
"187 .",
"189 .",
"193 .",
"195 .",
"198 .",
"199 .",
"200 .",
"201 .",
"202 .",
"203 .",
"204 .",
"205 .",
"206 .",
"209 .",
"210 .",
"212 .",
"213 .",
"218 .",
"219 .",
"41 .",
"46 .",
"58 .",
"59 .",
"61 .",
"70 .",
"72 .",
"75 .",
"77 .",
"78 .",
"79 .",
"80 .",
"83 .",
"84 .",
"85 .",
"87 .",
"92 .",
"94 .",
"95 .",
"98 .",
"99 .",
"124 .",
"256 .",
"512 .",
"102 .",
":3128",
"211 .",
"194 .",
"202 .",
"146 .",
"169 .",
"195 .",
"152 .",
"222 .",
"83 .",
"221 .",
"211 .",
"134 .",
"110 .",
"8 .",
"164 .",
"109-",
"115-",
"119-",
"128-",
"133-",
"140-",
"149-",
"65-",
"32-",
"66-",
":3127",
"150-",
"156-",
"167-",
"173-",
"174-",
"184-",
"187-",
"189-",
"193-",
"195-",
"198-",
"199-",
"200-",
"201-",
"202-",
"203-",
"204-",
"205-",
"206-",
"209-",
"210-",
"212-",
"213-",
"218-",
"219-",
"41-",
"46-",
"58-",
"59-",
"61-",
"70-",
"72-",
"75-",
"77-",
"78-",
"79-",
"80-",
"83-",
"84-",
"85-",
"87-",
"92-",
"94-",
"95-",
"98-",
"99-",
"124-",
"256-",
"512-",
"102-",
":3128",
"211-",
"194-",
"202-",
"146-",
"169-",
"195-",
"152-",
"222-",
"83-",
"221-",
"211-",
"134-",
"110-",
"8-",
"164-",
"109.",
"115.",
"119.",
"128.",
"133.",
"140.",
"149.",
"65.",
"32.",
"66.",
":3127",
"150.",
"156.",
"167.",
"173.",
"174.",
"184.",
"187.",
"189.",
"193.",
"195.",
"198.",
"199.",
"200.",
"201.",
"202.",
"203.",
"204.",
"205.",
"206.",
"209.",
"210.",
"212.",
"213.",
"218.",
"219.",
"41.",
"46.",
"58.",
"59.",
"61.",
"70.",
"72.",
"75.",
"77.",
"78.",
"79.",
"80.",
"83.",
"84.",
"85.",
"87.",
"92.",
"94.",
"95.",
"98.",
"99.",
"124.",
"256.",
"512.",
"102.",
":3128",
"211.",
"194.",
"202.",
"146.",
"169.",
"195.",
"152.",
"222.",
"83.",
"221.",
"211.",
"134.",
"110.",
"1.",
"164.",
"109  .",
"115  .",
"119  .",
"128  .",
"133  .",
"140  .",
"149  .",
"65  .",
"32  .",
"66  .",
":3127",
"150  .",
"156  .",
"167  .",
"173  .",
"174  .",
"184  .",
"187  .",
"189  .",
"193  .",
"195  .",
"198  .",
"199  .",
"200  .",
"201  .",
"202  .",
"203  .",
"204  .",
"205  .",
"206  .",
"209  .",
"210  .",
"212  .",
"213  .",
"218  .",
"219  .",
"41  .",
"46  .",
"58  .",
"59  .",
"61  .",
"70  .",
"72  .",
"75  .",
"77  .",
"78  .",
"79  .",
"80  .",
"83  .",
"84  .",
"85  .",
"87  .",
"92  .",
"94  .",
"95  .",
"98  .",
"99  .",
"124  .",
"256  .",
"512  .",
"102  .",
":3128",
"211  .",
"194  .",
"202  .",
"146  .",
"169  .",
"195  .",
"152  .",
"222  .",
"83  .",
"221  .",
"211  .",
"134  .",
"110  .",
"56  .",
"164  ."
};

public 
OnFilterScriptInit()
{
    print(
"\n-------------LOADING Fs ....---------");
    print(
" Ant-Hacker 2.0 by: RogerioExper                ");
    print(
"  Anti-divulguer                            ");
    print(
"  anti-bot                      ");
    print(
"  Ping Carregado Max :1000                  ");
    print(
"  Anti-palavroes                     ");
    print(
"  Anti-speed-hack                     ");
    print(
"  Anti-spam-de-carros                     ");
    print(
"  Anti-rcon                    ");
    print(
"  FS-carregado                    ");
    print(
"--------------------------------------\n");
    
SetTimer("CheckHacks",2000,1);
    
SetTimer("CheckPing",5000,1);
    
SetTimer("AntiSH",500,true);
    if(!
fexist("hf.txt"))
    {
       print(
"WARNING! File hf.txt missing from scriptfiles!");
    }
    return 
1;
}
new 
a[][] =
{
"Unarmed (Fist)",
"Brass K"
};
#pragma unused a

#define SCM SendClientMessage
new xacalaca[MAX_PLAYERS];
public 
OnFilterScriptExit()
{
    print(
"\n-------------Fechado Ant-HACKER----------------");
    print(
" Ant-Hacker Fechando By:rogerio");
    print(
"--------------------------------------\n");
    return 
1;
}

//------------------------------ANTI-RCON-------------caso vc nao usa rcon й sу vc tirar os /* */
/*public OnRconLoginAttempt(ip[], password[], success)
{
    new pip[16];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        GetPlayerIp(i, pip, sizeof(pip));
        if(!strcmp(ip, pip, true))
        {
        Kick(i, "/RCON LOGIN");
      }
    }
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
        for(new x = 0, y = GetMaxPlayers(); x != y; x++)
        {
            new IPs[32];
            GetPlayerIp(x, IPs, 32);
            if(strcmp(ip, IPs)) continue;
            new PlayerName[MAX_PLAYER_NAME];
            GetPlayerName(x, PlayerName, MAX_PLAYER_NAME);
            if(!strcmp(PlayerName, "Staff_Dono", true) || !strcmp(PlayerName, "Staff_Dono2", true) || !strcmp(PlayerName, "Staff_Dono3", true) || !strcmp(PlayerName, "Staff_Dono4", true))
            {
                SendClientMessage(x, 0x33CCFFAA, "[Info]Vocк estб autorizado a logar na RCON.");
            }
            else
            {
                SendClientMessage(x, 0x33CCFFAA, "[Info]Vocк nгo estб autorizado a logar na RCON.");
                Kick(x);
            }
            return 1;
        }
    }
    return 1;
}*/
//---------------------------------------------ANTI-BOT
public OnPlayerConnect(playerid)
{
    new 
name[MAX_PLAYER_NAME], string[256];
    
GetPlayerName(playeridnamesizeof(name));
    
format(stringsizeof(string), "%s",name);
    for(new 
fdp=0;fdp<RONALDO_LOL;fdp++){
        if(
strfind(stringIP[fdp], true) != -1)
        {
            new 
string2[128];
            new 
PlayerName[30];
            
GetPlayerName(playeridPlayerName30);
            
format(string2sizeof(string2), "%s Foi kickado Pelo Administrador %s Por Tentar Divulgar !",PlayerName);
            
SendClientMessageToAll(0xFF0000AAstring2);
            
SpawnPlayer(playerid);
            
SetPlayerPos(playerid1,1,1);
            
TimerFDP SetTimerEx("FDP"100000"i"playerid);
            return 
0;
        }
    }
    
    new 
connecting_ip[32+1];
    
GetPlayerIp(playerid,connecting_ip,32);
    new 
num_players_on_ip GetNumberOfPlayersOnThisIP(connecting_ip);

    if(
num_players_on_ip MAX_CONNECTIONS_FROM_IP) {
        
printf("MAXIPs: Connecting player(%d) exceeded %d IP connections from %s."playeridMAX_CONNECTIONS_FROM_IPconnecting_ip);
        
Ban(playerid);
        return 
1;
    }

    new 
nomedocara3[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnomedocara3sizeof(nomedocara3));
    for(new 
nsizeof(AntiNomeBot); ++n)
    {
    if(!
strcmp(nomedocara3AntiNomeBot[n], true))
    {
    
SendClientMessage(playerid,-1,"Vocк foi Banido do Servidor Noob Infeliz Vo comer sua Mae e sua Irma nao usa xiter aq");
    
Ban(playerid);
    return 
1;
    }
    }
    return 
1;
    }
    
stock GetNumberOfPlayersOnThisIP(test_ip[])
{
    new 
against_ip[32+1];
    new 
0;
    new 
ip_count 0;
    for(
x=0x<MAX_PLAYERSx++) {
        if(
IsPlayerConnected(x)) {
            
GetPlayerIp(x,against_ip,32);
            if(!
strcmp(against_ip,test_ip)) ip_count++;
        }
    }
    return 
ip_count;
}
//--------------------------------------------------------------------------------------------------------------------------
public FDP(playerid)
{
    
Kick(playerid);
    
KillTimer(TimerFDP);
    return 
1;
}
//-------------------------PING--

forward CheckPing(playerid);
public 
CheckPing(playerid)
{
    if(
GetPlayerPing(playerid) > MAXPING)
    {
    
SendClientMessage(playerid,-1,"Vocк foi kickado do Servidor, pois seu ping ultrapassou o limite de 1200 me desculpe");
    
Kick(playerid);
     }
    return 
0;
   }
//------------------------------------------------------------------------------
stock KickMessage(const string[])
{
    new 
File:HF fopen("hf.txt",io_append);
    
fwrite(HFstring);
    
fclose(HF);
    return 
1;
}
//-------------------------------anti-speed-------------------------------------
public AntiSH(playerid)
{
if(
GetSpeedKM(playerid) > 300)
{
SendClientMessage(playerid,-1,"Seu veiculo Trava Aos 300, pois Usou SpeedHack Seu Noob Otario FDM");
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0 0.0 0.0);
}
return 
1;
}

stock IsPlayerInWater(playerid)
{
new 
Float:x,Float:y,Float:pz;
GetPlayerPos(playerid,x,y,pz);
if (
(
IsPlayerInArea(playerid2032.13711841.26561703.16531467.1099) && pz <= 9.0484//lv piratenschiff
|| (IsPlayerInArea(playerid2109.07252065.82321962.535510.8547) && pz <= 10.0792//lv visage
|| (IsPlayerInArea(playerid, -492.5810, -1424.71222836.82842001.8235) && pz <= 41.06//lv staucamm
|| (IsPlayerInArea(playerid, -2675.1492, -2762.1792, -413.3973, -514.3894) && pz <= 4.24//sf sьdwesten kleiner teich
|| (IsPlayerInArea(playerid, -453.9256, -825.7167, -1869.9600, -2072.8215) && pz <= 5.72//sf gammel teich
|| (IsPlayerInArea(playerid1281.02511202.2368, -2346.7451, -2414.4492) && pz <= 9.3145//ls neben dem airport
|| (IsPlayerInArea(playerid2012.61541928.9028, -1178.6207, -1221.4043) && pz <= 18.45//ls mitte teich
|| (IsPlayerInArea(playerid2326.48582295.7471, -1400.2797, -1431.1266) && pz <= 22.615//ls weiter sьdцstlich
|| (IsPlayerInArea(playerid2550.04542513.75881583.37511553.0753) && pz <= 9.4171//lv pool цstlich
|| (IsPlayerInArea(playerid1102.36341087.3705, -663.1653, -682.5446) && pz <= 112.45//ls pool nordwestlich
|| (IsPlayerInArea(playerid1287.79061270.4369, -801.3882, -810.0527) && pz <= 87.123//pool bei maddog's haus oben
|| (pz 1.5)
)
{
return 
1;
}
return 
0;
}
stock
    GetSpeedKM
(playerid)
{
    new
        
Float:PosX,
        
Float:PosY,
        
Float:PosZ,
        
Float:PlayerSpeedDistance;

     
GetVehicleVelocity(GetPlayerVehicleID(playerid), PosXPosYPosZ);
    
PlayerSpeedDistance floatmul(floatsqroot(floatadd(floatadd(floatpower(PosX2), floatpower(PosY2)),  floatpower(PosZ2))), 170.0);
    new
         
spe floatround(PlayerSpeedDistance 1);
    return 
spe;
}
stock IsPlayerInArea(playeridFloat:minxFloat:maxxFloat:minyFloat:maxy)
{
new 
Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
if (
minx && maxx && miny && maxy) return 1;
return 
0;
}
//-----------------------------anti-palavroes=e=dv------------------------------
public OnPlayerText(playerid,text[])
{
//antiDV
    
new string[256];
    for(new 
fdp=0;fdp<RONALDO_LOL;fdp++){
        if(
strfind(textIP[fdp], true) != -1)
        {
            new 
string2[128];
            new 
PlayerName[30];
            
GetPlayerName(playeridPlayerName30);
            
format(string2sizeof(string2), "%s Foi kickado Pelo Administrador Kavin Por Tentar Divulgar !",PlayerName);
            
SendClientMessageToAll(0xFF0000AAstring2);
            new 
nomefdp[30], ipdivulgado[512], ipfdp[128], iplolol[128];
            
GetPlayerIp(playerid,iplolol,128);
            
GetPlayerName(playeridnomefdp30);
            
format(ipdivulgado256"%s"text);
            
format(ipfdp256"%s"iplolol);
            new 
File:ofdp=fopen("divulgadores.txt"io_append);
            new 
iFDP strval(ipfdp);
            
format(string256"Nome Do FDP: %s - Ip Divulgado: %s - Ip do FDP: %s \n"nomefdpipdivulgadoiFDP);
            
fwrite(ofdpstring);
            print(string);
            
fclose(ofdp);
            
SetPlayerPos(playerid1,1,1);
            
TimerFDP SetTimerEx("FDP"100000"i"playerid);
            return 
0;
        }
    }
    
    for(new 
isizeof(Palavroes); != ji++)
    {
        if(
strfind(text,Palavroes[i],true) != -1)
        {
            
Avisos[playerid]++;
            new 
sStr[60];
            
format(sStr,sizeof(sStr),"Nгo fale palavrхes no chat [%i/3]",Avisos[playerid]);
            
SendClientMessage(playerid,-1,sStr);
            if(
Avisos[playerid] == 3Kick(playerid), Avisos[playerid] = 0;
            return 
false;
        }
    }
    return 
true;
}

//--------------------------------anti-spwn-carros------------------------------
public OnPlayerStateChange(playeridnewstateoldstate)
{
    
xacalaca[playerid] ++;
    
SetTimerEx("desxacalaca"1000,false,"i",playerid);
    return 
1;
}
forward desxacalaca(playerid);
public 
desxacalaca(playerid)
{
xacalaca[playerid] --;
if(
xacalaca[playerid] > 10)
{
new 
bibi[128], Nome[MAX_PLAYER_NAME];
SCM(playerid, -1"Este servidor estб protegido pelo sistema Kocars e vocк foi banido por spam de veнculos");
GetPlayerName(playeridNomesizeof(Nome));
format(bibisizeof(bibi), "[Koprotect]: %s foi banido pelo uso do mod cleo 4 car spam."Nome);
SendClientMessageToAll(-1bibi);
Ban(playerid);
}
//printf("xacalaca = %d", xacalaca[playerid]); // debug
return 1;
}
//------------------------------------------------------------------------------
forward Hack();
public 
Hack()
{
    new 
string[256];
    for(new 
i!= MAX_PLAYERSi++) {
        if(
IsPlayerConnected(i)) {
            new 
keysupdownleftright; static Aviso[MAX_PLAYERS];
            
GetPlayerKeys(ikeysupdownleftright);
            new 
Nome[MAX_PLAYER_NAME]; GetPlayerName(iNomesizeof(Nome));
            static 
Float:Pos[4][MAX_PLAYERS]; Pos[3][i] = GetPlayerDistanceFromPoint(iPos[0][i], Pos[1][i], Pos[2][i]); GetPlayerPos(iPos[0][i], Pos[1][i], Pos[2][i]);
            if((
keys KEY_ACTION || keys KEY_FIRE) && (floatround(floatmul(Pos[3][i], 10.0)) > 200) && (IsPlayerInAnyVehicle(i))) {
                
TogglePlayerControllable(ifalse);
                
SetTimerEx("Descongelar"1000false"i"i);
                if(
Aviso[i] == 3) {
                    
format(string128"[B.L.P]: %s (%d) foi kickado pelo Admin Bot | Motivo: Usou-Speed-hacker"Nomei);
                    
SendClientMessageToAll(COR_VERMELHOstring);
                    
Kick(i);
                }
                
Aviso[i]++;
            }
        }
    }
}

forward Descongelar(i); public Descongelar(iTogglePlayerControllable(itrue);
//=============================antiDV===========================================
public OnPlayerCommandText(playeridcmdtext[])
{
    new 
string[256];
     for(new 
fdp=0;fdp<RONALDO_LOL;fdp++){
        if(
strfind(cmdtextIP[fdp], true) != -1)
        {
            new 
string2[128];
            new 
PlayerName[30];
            
GetPlayerName(playeridPlayerName30);
            
format(string2sizeof(string2), "%s Foi kickado Pelo Administrador Kavin Por Tentar Divulgar !",PlayerName);
            
SendClientMessageToAll(0xFF0000AAstring2);

            new 
nomefdp[30], ipdivulgado[512], ipfdp[128], iplolol[128];
            
GetPlayerIp(playerid,iplolol,128);
            
GetPlayerName(playeridnomefdp30);
            
format(ipdivulgado256"%s"cmdtext);
            
format(ipfdp256"%s"iplolol);
            new 
File:ofdp=fopen("divulgadores.txt"io_append);
            new 
iFDP strval(ipfdp);
            
format(string256"Nome Do FDP: %s - Ip Divulgado: %s - Ip do FDP: %s \n"nomefdpipdivulgadoiFDP);
            
fwrite(ofdpstring);
            print(string);
            
fclose(ofdp);

            
SetPlayerPos(playerid1,1,1);
            
TimerFDP SetTimerEx("FDP"100000"i"playerid);

            return 
0;
        }
    }
    return 
0;

Reply
#8

OnPlayerText + strfind nгo tem mistйrio '-'
Reply
#9

Seu GM tem um Ant Divulgador ? basta adicionar os palavrхes que deseja bloquear.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)