Working anti-reconnect. -
tuuler - 17.07.2014
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.
Re: Working anti-reconnect. -
GeekSiMo - 17.07.2014
Not understand !!??
Re: Working anti-reconnect. -
tuuler - 17.07.2014
Quote:
Originally Posted by GeekSiMo
Not understand !!??
|
That is your own problem if u cant understand english.
Re: Working anti-reconnect. -
GeekSiMo - 17.07.2014
I understand English But Can't Understand How Players Can Reconnect Without Leaving The Game !!!!
Re: Working anti-reconnect. -
tuuler - 17.07.2014
Quote:
Originally Posted by GeekSiMo
I understand English But Can't Understand How Players Can Reconnect Without Leaving The Game !!!! ![Tongue](images/smilies/razz.gif)
|
They are using some hacks to do it, I dont know how.
Re: Working anti-reconnect. -
Scottas - 17.07.2014
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.
Re: Working anti-reconnect. -
tuuler - 17.07.2014
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.
Re: Working anti-reconnect. -
Kyance - 17.07.2014
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
Re: Working anti-reconnect. -
Scottas - 17.07.2014
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
Re: Working anti-reconnect. -
tuuler - 17.07.2014
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.