Potentially Life RpG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

[BRASIL] Potentially Life [RPG] © - Ip: 37.59.160.248:7777


2 participantes

    Ant DDos que funciona

    MADARA
    MADARA


    Mensagens : 12
    Data de inscrição : 22/07/2012

    Ant DDos que funciona Empty Ant DDos que funciona

    Mensagem  MADARA Qua Jul 25, 2012 11:56 am

    // maxips FS limits the number of players connecting from a
    // single IP address.

    #include <a_samp>

    #define MAX_CONNECTIONS_FROM_IP 4

    //---------------------------------------------

    public OnFilterScriptInit()
    {
    printf("\n*** Player IP limiting FS (maxips) Loaded. Max connections from 1 IP = %d\n",MAX_CONNECTIONS_FROM_IP);
    }

    //---------------------------------------------
    // GetNumberOfPlayersOnThisIP
    // Returns the number of players connecting from the
    // provided IP address
    stock GetNumberOfPlayersOnThisIP(test_ip[])
    {
    new against_ip[32+1];
    new x = 0;
    new ip_count = 0;
    for(x=0; x<MAX_PLAYERS; x++) {
    if(IsPlayerConnected(x)) {
    GetPlayerIp(x,against_ip,32);
    if(!strcmp(against_ip,test_ip)) ip_count++;
    }
    }
    return ip_count;
    }

    //---------------------------------------------

    public OnPlayerConnect(playerid)
    {
    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("O player (%d) exerceu %d IPs conectados %s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
    Ban(playerid);
    return 1;
    }

    return 0;
    }

    //---------------------------------------------
    Wallace_.
    Wallace_.


    Mensagens : 270
    Data de inscrição : 30/04/2012
    Idade : 28
    Localização : Rio de Janeiro

    Ant DDos que funciona Empty Re: Ant DDos que funciona

    Mensagem  Wallace_. Qua Jul 25, 2012 6:14 pm

    Oo ?
    MaxIps?
    Euri, então se 4 players logarem em uma lan iram ser banidos...
    Além de Hacker Lixo é Burro!

      Data/hora atual: Qui Mar 28, 2024 5:23 am