17.07.2014, 17:58
Quote:
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.
|
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;
}