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.