Working anti-reconnect.
#1

Hello, I need help, some people in my server are using some hacks to reconnect fast back to my server if they get kicked, but I cant find a working anti-reconnect. Does somebody has one what is working, or can someone link it to me please? I really need it, thank you.
Reply
#2

Not understand !!??
Reply
#3

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
Not understand !!??
That is your own problem if u cant understand english.
Reply
#4

I understand English But Can't Understand How Players Can Reconnect Without Leaving The Game !!!!
Reply
#5

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
I understand English But Can't Understand How Players Can Reconnect Without Leaving The Game !!!!
They are using some hacks to do it, I dont know how.
Reply
#6

probably there are some tools. After player disconnects, get timestamp and ip.When player connects, compare his IP, check time passed and if there is something wrong - kick him.
Reply
#7

Quote:
Originally Posted by Scottas
Посмотреть сообщение
probably there are some tools. After player disconnects, get timestamp and ip.When player connects, compare his IP, check time passed and if there is something wrong - kick him.
If I only would know how to do it, lol.
Reply
#8

Quote:
Originally Posted by Scottas
Посмотреть сообщение
probably there are some tools. After player disconnects, get timestamp and ip.When player connects, compare his IP, check time passed and if there is something wrong - kick him.
as far as I know, you can't get someone's IP when they disconnect.

Uh, a small idea i guess.. Dunno if It will help, not tested either xD

pawn Код:
#include <a_samp>
#include <foreach>

new PlayerIP[ MAX_PLAYERS ];

public OnPlayerConnect(playerid)
{
    new pIP[16];
    PlayerIP[ playerid ] = GetPlayerIp(playerid, pIP, sizeof(pIP));
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    SetTimerEx("CheckIP", 1500, false, "i", playerid);
    return 1;
}

forward CheckIP(playerid);
public CheckIP(playerid)
{
    new pIP[16];
    foreach(Player, i)
    {
        GetPlayerIp(i, pIP, sizeof(pIP));
        if(strcmp(PlayerIP[ playerid ], pIP) == 0)
        {
            new pName[ MAX_PLAYER_NAME ];
            GetPlayerName(playerid, pName, sizeof(pName));
            printf("%s has used a 'reconnect' exploit/hack, kicking..", pName);
            Kick(playerid);
        }
    }
    return 1;
}
Not tested.. Increasing the timer might help( if something weird happens ), dunno :d
Reply
#9

pawn Код:
#include    <a_samp>

#define     MIN_RECONNECT_TIME      5000

new
    gIP[MAX_PLAYERS][16],
    gTime[MAX_PLAYERS];

public  OnPlayerDisconnect(playerid, reason)
{
    GetPlayerIp(playerid, gIP[playerid], 16);
    gTime[playerid] = GetTickCount();
}

public  OnPlayerConnect(playerid)
{
    new
        IP[16],
        Time = GetTickCount();
       
    //  first check if playerid hasn't changed
    GetPlayerIp(playerid, IP, 16);
    if(!strcmp(IP, gIP[playerid]))
    {
        //  Check time passed
        if(Time - gTime[playerid] < MIN_RECONNECT_TIME)
            Kick(playerid);
        return 1;
    }
    //  else we're going to check all the players
    for(new i; i < MAX_PLAYERS; i++)
    {
        if((i == playerid) || IsPlayerConnected(i))
            continue;
        //  We make sure, that gIP[i] is not empty
        if(strlen(gIP[i]) && gTime[i] != 0)
        {
            if(!strcmp(IP, gIP[i])) // IP match
            {
                if(Time - gTime[i] < MIN_RECONNECT_TIME)    // time have not passed
                {
                    Kick(playerid);
                    break;
                }
            }
        }
    }
    return 1;
}
Try this. I have not tested it yet, I don;t have any of these hacks. It should work as filterscript
Reply
#10

Quote:
Originally Posted by Scottas
Посмотреть сообщение
pawn Код:
#include    <a_samp>

#define     MIN_RECONNECT_TIME      5000

new
    gIP[MAX_PLAYERS][16],
    gTime[MAX_PLAYERS];

public  OnPlayerDisconnect(playerid, reason)
{
    GetPlayerIp(playerid, gIP[playerid], 16);
    gTime[playerid] = GetTickCount();
}

public  OnPlayerConnect(playerid)
{
    new
        IP[16],
        Time = GetTickCount();
       
    //  first check if playerid hasn't changed
    GetPlayerIp(playerid, IP, 16);
    if(!strcmp(IP, gIP[playerid]))
    {
        //  Check time passed
        if(Time - gTime[playerid] < MIN_RECONNECT_TIME)
            Kick(playerid);
        return 1;
    }
    //  else we're going to check all the players
    for(new i; i < MAX_PLAYERS; i++)
    {
        if((i == playerid) || IsPlayerConnected(i))
            continue;
        //  We make sure, that gIP[i] is not empty
        if(strlen(gIP[i]) && gTime[i] != 0)
        {
            if(!strcmp(IP, gIP[i])) // IP match
            {
                if(Time - gTime[i] < MIN_RECONNECT_TIME)    // time have not passed
                {
                    Kick(playerid);
                    break;
                }
            }
        }
    }
    return 1;
}
Try this. I have not tested it yet, I don;t have any of these hacks. It should work as filterscript
Tested it, when I go ingame, it just wont connect to the server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)