SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese > Lançamentos/Releases

Reply
 
Thread Tools Display Modes
Old 22/07/2012, 11:47 PM   #11
Nigel
Banned
 
Join Date: Apr 2006
Posts: 31
Reputation: 1
Smile Re: Anti-DDos Bot

Parabéns Bruno
Nigel is offline   Reply With Quote
Old 23/07/2012, 12:14 AM   #12
Juninho_Oakley
Gangsta
 
Juninho_Oakley's Avatar
 
Join Date: Aug 2011
Location: Fim do Mundo
Posts: 509
Reputation: 28
Default Re: Anti-DDos Bot

muito foda draks otimo trabalho
__________________
Favorite Games





Graphic Card


User

Juninho_Oakley is offline   Reply With Quote
Old 23/07/2012, 03:04 AM   #13
Mercurio
Gangsta
 
Join Date: Dec 2011
Posts: 518
Reputation: 2
Default Re: Anti-DDos Bot

deu um warning

pawn Code:
warning 203: symbol is never used: "botGetIP"
Poderia me responder Drakins?
Eu tento colocar a linha:
pawn Code:
if(IsPlayerBOT(playerid)) return false;
No local onde "há playerid"
Ma dá erros...
__________________
Mercurio is offline   Reply With Quote
Old 23/07/2012, 03:49 AM   #14
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,087
Reputation: 545
Default Respuesta: Anti-DDos Bot

Que erros?
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 23/07/2012, 03:57 AM   #15
Mercurio
Gangsta
 
Join Date: Dec 2011
Posts: 518
Reputation: 2
Default Re: Anti-DDos Bot

pawn Code:
warning 203: symbol is never used: "botGetIP"
pawn Code:
error 021: symbol already defined: "playerip"
linha: playerip[24]
__________________
Mercurio is offline   Reply With Quote
Old 23/07/2012, 04:11 AM   #16
Mercurio
Gangsta
 
Join Date: Dec 2011
Posts: 518
Reputation: 2
Default Re: Anti-DDos Bot

Alguém poderia me ajudar?
__________________
Mercurio is offline   Reply With Quote
Old 23/07/2012, 04:11 AM   #17
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,087
Reputation: 545
Default Respuesta: Anti-DDos Bot

São avisos, não erros.
playerip ocorre porque você já tem uma global chamada "playerip" e o botGetIP ocorre porque voce nao usou em nenhuma linha IsPLayerBot ..

PARA DE FAZER DOUBLE POST
Não é a primeira vez que você faz.
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 23/07/2012, 04:16 AM   #18
Mercurio
Gangsta
 
Join Date: Dec 2011
Posts: 518
Reputation: 2
Default Re: Respuesta: Anti-DDos Bot

Quote:
Originally Posted by [FeK]DraKiNs View Post
São avisos, não erros.
playerip ocorre porque você já tem uma global chamada "playerip" e o botGetIP ocorre porque voce nao usou em nenhuma linha IsPLayerBot ..

PARA DE FAZER DOUBLE POST
Não é a primeira vez que você faz.
Mas sem o botGetIP, não funciona o código .-. eu tento colocar a linha onde há "playerid" mas não funciona.
__________________
Mercurio is offline   Reply With Quote
Old 23/07/2012, 04:30 AM   #19
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,087
Reputation: 545
Default Respuesta: Anti-DDos Bot

Coloca em um filterscript
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 23/07/2012, 04:35 AM   #20
Mercurio
Gangsta
 
Join Date: Dec 2011
Posts: 518
Reputation: 2
Default Re: Respuesta: Anti-DDos Bot

Quote:
Originally Posted by [FeK]DraKiNs View Post
Coloca em um filterscript
Ok

Quando coloco a linha:
pawn Code:
if(IsPlayerBOT(playerid)) return false;
Eu obtenho o seguinte erro:
pawn Code:
error 017: undefined symbol "IsPlayerBOT"

@EDIT

Eu estou utilizando o código em FS assim:

pawn Code:
#include a_samp

#if !defined varGet
#define varGet(%0)      getproperty(0,%0)
#endif

#if !defined varSet
#define varSet(%0,%1) setproperty(0, %0, %1)
#endif

#define IsPlayerBot(%0)\
            GetPlayerPing(%0) == 65535 && (gettime() - varGet((GetPlayerIp(%0, botGetIP, sizeof botGetIP), botGetIP)) > 5)


public OnPlayerConnect(playerid) {

    if(IsPlayerNPC(playerid)) return false;

    static
        playerip[24]
    ;

    GetPlayerIp(playerid, playerip, 24);

    if(gettime() - varGet(playerip) < 2) {


        strcat(playerip, "di_S");

        if(gettime() - varGet(playerip) < 3) {
            return false;
        }

        printf("%d Entrou em menos de 2 segundos", playerid);

        GetPlayerIp(playerid, playerip, 20);

        varSet(playerip, gettime());

        strcat(playerip, "x");

        static timers ;
        timers = varGet(playerip);

        varSet(playerip, 1+ timers);

        if(timers > 2) {

            playerip[strlen(playerip) - 2] = 0;

            printf("BOT: ID -> %d IP -> %s", playerid, playerip);
            BanEx(playerid, "Bot Connect");
        }
    }
    if(IsPlayerNPC(playerid)) return false;
    return varSet(playerip, gettime());
}


public OnPlayerDisconnect(playerid, reason) {
    if(reason == 2) {

        static
            playerip[20]
        ;


        GetPlayerIp(playerid, playerip, 20);
        strcat(playerip, "di_S");

        varSet(playerip, gettime());
    }
    if(IsPlayerNPC(playerid)) return false;
    return false;

}

E não está funfando...
Alguém pode me ajudar?
__________________

Last edited by Mercurio; 23/07/2012 at 05:09 AM.
Mercurio is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anti DDoS Protection? Toni Everything and Nothing 5 29/07/2011 05:47 PM
anti ddos Sin- Server Support 15 05/10/2009 06:46 PM
Anti ddos help Calibras Server Support 10 01/09/2009 02:58 PM


All times are GMT. The time now is 12:31 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.