Posts: 162
Threads: 61
Joined: Jun 2011
Reputation:
0
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.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
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?
Posts: 162
Threads: 61
Joined: Jun 2011
Reputation:
0
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