Delay kick question - 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: Delay kick question (
/showthread.php?tid=663564)
Delay kick question -
Leaky - 05.02.2019
Ok, I built this IP ban system(not the issue here) but I just want to know if there is a way to delay the default ban check. Let me get into details.
PHP код:
//say I have this command
CMD:ban(playerid)
{
ban(playerid); // the default way of banning. SAMP way
return 1;
}
The original way stated above will add the players IP address to a file called
samp.ban or something of this sort. Now once a player connects with the IP that was stored they get kicked immediately as they successfully connect to the server, I want to know if there is a way to delay this kick for at least 10 seconds?
Re: Delay kick question -
Pottus - 05.02.2019
Create your own ban system that doesn't use the samp ban file.
Re: Delay kick question -
Leaky - 05.02.2019
Quote:
Originally Posted by Pottus
Create your own ban system that doesn't use the samp ban file.
|
Yes, my ban system does not use the SAMP ban file but I just want to know if it's possible and if yes, how to do it? but I'm assuming that with this answer you gave it's not possible, am I right?
Re: Delay kick question -
Exhibit - 05.02.2019
It is possible. After you check for the banned player just run a timer for 10 seconds and kick him?
Re: Delay kick question -
Beckett - 06.02.2019
Quote:
Originally Posted by Leaky
Yes, my ban system does not use the SAMP ban file but I just want to know if it's possible and if yes, how to do it? but I'm assuming that with this answer you gave it's not possible, am I right?
|
It's not possible unless you apply your own ban system.
Re: Delay kick question -
Pottus - 06.02.2019
Wait there might actually be a possibility check if OnIncomingConnection() is called before the ban check is made. If so you can unban them them just set a timer to reban/kick after 10 seconds or disconnection whatever comes first.
Re: Delay kick question -
Pottus - 06.02.2019
Yeah, it doesn't state it on the wiki about this after you check let us know so the wiki can be updated for future reference.