Checkban - 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: Checkban (
/showthread.php?tid=634214)
Checkban -
Loinal - 15.05.2017
Hello guys i fixed my problem with admin system but still have a small problem
When i ban a player when he reconnect the system doesn't check if he is banned or not.
Filterscript
https://pastebin.com/seKgB8xd
Iam using R41-2
Re: Checkban -
Tord - 15.05.2017
Does an entry appear in your database when you ban them?
What does MySQL logs tell you?
Re: Checkban -
Logic_ - 15.05.2017
The whole system is scripted very awfully. You should better recreate it with the following stuff taken in consideration:
- Use `ID` as NOT NULL AUTO INCREMENT column
- Add a column for player name and another for storing player's IP.
- This one will be used to store ban time, use gettime() and store the data into this.
- Now the final one, from whom the player was banned by. This must be VARCHAR (24).
Now when the player connects.
- Call OnBanCheck query
- If player is banned, compare the time by using gettime(), if the current time is more than the stored, the player's ban has expired and you can do what ever you like. If the stored time is not higher then you can kick them for being banned from IG.
- If player is not banned, query the player account stuff and you're good to go.