Problem with the defender against bots attack
#1

I have attacked in my server that the bots Joined and Exit with no stopping, I did check if the time of the connect is the same like the time in the disconnect -

PHP код:
new HourInside[MAX_PLAYERS],MinInside[MAX_PLAYERS],SecInside[MAX_PLAYERS],IpList[][50],NumIp
OnPlayerConnect:

PHP код:
gettime(HourInside[playerid],MinInside[playerid],SecInside[playerid]);
for(new 
i<= NumIpi++)
if(!
strcmp(GetIp(playerid),IpList[i],false)) BanEx(playerid,"BotSys"); 
OnPlayerDisconnect:

PHP код:
if(reason == 1)
{
new 
hour,minute,second;
gettime(hour,minute,second);
    if(
hour == HourInside[playerid] && minute == MinInside[playerid] && second == SecInside[playerid])
    {
    
format(IpList[NumIp],50,"%s",GetIp(playerid));
    
NumIp++;
    }
}
HourInside[playerid] = 0MinInside[playerid] = 0SecInside[playerid] = 0
And sometimes regular players getting banned, what's the problem?

Please I Need It Quickly !!!
Reply
#2

JUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)