Prevent samp fron banning localhost / a ip - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Prevent samp fron banning localhost / a ip (
/showthread.php?tid=624582)
Prevent samp fron banning localhost / a ip - iLearner - 18.12.2016
I was using around 40 npcs in my server, but i noticed they get banned by samp with some reason "server full attack (1)" or something like that (in console), so i was wondering if there's a way to prevent samp 0.3x from auto banning a specific ip (127.0.0.1 i think)
Re: Prevent samp fron banning localhost / a ip -
SickAttack - 18.12.2016
If there was something, it would be here:
https://sampwiki.blast.hk/wiki/Server.cfg
But there isn't anything. Just make sure the maxnpc value is set to an acceptable number and that there's a delay between NPCs connecting.
The script could lock the server while NPCs are connecting then unlock it when they are all connected.
Re: Prevent samp fron banning localhost / a ip - iLearner - 18.12.2016
I've got a delay of "300ms" between each connect & have maxnpc to 100.
PHP код:
public OnFilterScriptInit()
{
Con1 = 0;
Timer1 = SetTimer("Connect1", 300, true);
SetTimer("lulz",1000,1);
return 1;
}
PHP код:
forward Connect1();
public Connect1()
{
if(Con1 < 51)
{
new filename[64],scriptname[32];
format(filename,sizeof(filename),"daddycar%d.cfg",Con1);
format(scriptname,sizeof(scriptname),"scriptfiles/daddycar%d.cfg",Con1);
if(!fexist(filename)) file_create(scriptname);
format(filename,sizeof(filename),"daddyskin%d.cfg",Con1);
format(scriptname,sizeof(scriptname),"scriptfiles/daddyskin%d.cfg",Con1);
if(!fexist(filename)) file_create(scriptname);
Con1 ++;
}
else
{
KillTimer(Timer1);
}
}
i've got 2 timers like that one ^
Re: Prevent samp fron banning localhost / a ip -
SickAttack - 18.12.2016
Do they get banned on runtime or when you start the server? Increase the interval of the timer if it is upon start-up.