SA-MP Forums Archive
[PEDIDO] Anti-Divulger. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [PEDIDO] Anti-Divulger. (/showthread.php?tid=323063)



[PEDIDO] Anti-Divulger. - Gustavo_z - 04.03.2012

Olб galera, jб estou no Fуrum SA-MP а algum tempo, mas esse irб ser o meu primeiro tуpico, em fim, alguйm aн tem algum COD de Anti-Divulger? Que quando algum player tentar divulgar sites, IP de servidores, nomes outros servidores... que o mesmo seja kickado automaticamente, e quando o player for kickado automaticamente, que apareзa no chat para todo mundo ver quando o mesmo for kickado, assim: "%s foi kickado por divulgar sites ou IP de outros servidores!"
Obrigado.



Re: [PEDIDO] Anti-Divulger. - Đeagle - 04.03.2012

[FilterScript] Anti-Divulgador



Re: [PEDIDO] Anti-Divulger. - Gustavo_z - 04.03.2012

Deagle, neste tutorial, eu fiz tudo como era para fazer mas deu milhares de erros, se puder me disponibilizar outro, eu agradeзo.


Re: [PEDIDO] Anti-Divulger. - [O.z]Caroline - 04.03.2012

Coloque no OnPlayerText:
pawn Код:
if(detectIP(text))
    {
        new
            string[128];
        GetPlayerName(playerid, string, 20);
        format(string, sizeof(string), "[!] \"%s\"Foi Kickado Por Postar IP no Servidor! [Motivo: Divulgando IP]", string);
        SendClientMessageToAll(Amarelo, string);
        return Kick(playerid), false;
    }

Coloque no final de seu script:
pawn Код:
stock detectIP(text[])
{
    new dotCount;
    for(new i; i < strlen(text); ++i)
    {
        if('0' <= text[i] <= '9')
        {
            do
            {
                if(text[i] == '.') ++dotCount;
                ++i;
            }
            while(('0' <= text[i] <= '9') || text[i] == '.' || text[i] == ':');
        }
    }
    if(dotCount >= 3) return true;
    return false;
}
Crйditos: RyDeR'


Re: [PEDIDO] Anti-Divulger. - Gustavo_z - 04.03.2012

Caroline, esse COD, й tambйm de quando o player digitar o nome de servers ou sites, que ele seja kickado automaticamente tambйm nй?


Re: [PEDIDO] Anti-Divulger. - histire - 04.03.2012

Kick(playerid)