ban with amount of days
#6

A good idea would be to use gettime(). Work out how many seconds in a day* then add that to the current time value, then store that in mySQL. If a player joins and they're banned and their unban time isn't reached, kick them. Simple.

* To work out seconds in a day:
1 minute = 60 sec
1 hour = 3600 seconds
24 hours = 86400

Set ban time to gettime() + (86400 * days);
Reply


Messages In This Thread
ban with amount of days - by Geeboi_Mehdi - 10.06.2013, 22:23
Re: ban with amount of days - by Aly - 11.06.2013, 04:30
Re: ban with amount of days - by Geeboi_Mehdi - 11.06.2013, 20:36
Re: ban with amount of days - by Aly - 11.06.2013, 20:49
Re: ban with amount of days - by Geeboi_Mehdi - 11.06.2013, 21:22
Re: ban with amount of days - by MP2 - 11.06.2013, 21:33
Re: ban with amount of days - by zT KiNgKoNg - 11.06.2013, 21:47

Forum Jump:


Users browsing this thread: 2 Guest(s)