Ban Command - 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: Ban Command (
/showthread.php?tid=317732)
Ban Command -
SpankMe2 - 12.02.2012
Hey,
How can I make a simple offline ban command? I dont want to use the native ban function. Any save system will do as i'll convert it.
Thanks.
Re: Ban Command -
MP2 - 12.02.2012
mySQL is a good option for a ban system.
You need a table with the required fields:
- Name of the banned player
- IP of the banned player
- Name of the banner
- IP of the banner
- Reason
- Expiry time (?)
Then just use a SELECT query under OnPlayerConnect to check if a ban exists.
SELECT * FROM `bans` WHERE IP = '%s'
%s being the player's IP.
EDIT: What do you mean by 'offline' ban system?
Re: Ban Command -
SpankMe2 - 12.02.2012
I dont know how to convert MySQL I can convert any other ban system.
By 'offline' I mean it has create a ban file for that player and take its IP from the player file also