Bot Attack
#9

Quote:
Originally Posted by Abagail
Посмотреть сообщение
If you mean they're connecting actual NPCs, you should simply add a validation check to ensure they're connecting locally. This can be done under OnPlayerConnect, for example:
pawn Код:
public OnPlayerConnect(playerid)
{
       new local_playerIP[32];
       GetPlayerIp(playerid, local_playerIP, 32);

       if(strcmp(local_playerIP, "127.0.0.1", true) != 0)
             return Ban(playerid);
 
       return true;
}
I wouldn't put that code on my server. It'll literally ban every player.

Ontopic: limit how many players can connect from an IP (in X seconds)
Reply


Messages In This Thread
Bot Attack - by Xportaler - 28.05.2017, 20:34
Re: Bot Attack - by Astralis - 28.05.2017, 20:40
Re: Bot Attack - by Logic_ - 28.05.2017, 20:42
Re: Bot Attack - by Xportaler - 28.05.2017, 20:43
Re: Bot Attack - by Abagail - 28.05.2017, 20:44
Re: Bot Attack - by Xportaler - 28.05.2017, 20:47
Re: Bot Attack - by Abagail - 28.05.2017, 20:49
Re: Bot Attack - by Xportaler - 28.05.2017, 21:07
Re: Bot Attack - by Spmn - 28.05.2017, 21:55
Re: Bot Attack - by Abagail - 28.05.2017, 21:56

Forum Jump:


Users browsing this thread: 4 Guest(s)