27.11.2009, 10:33
Few days ago I created temp ban sistem for my GM but I used MySQL functions so it was quite easier to calculate ban expire day. Here is my check if the ban has expired. I didn't have chance for complete test, but it seams working. Maybe it helps you.
It also has ban minutes and seconds...
EDIT: b prefix is for ban date and time
pawn Код:
if (!(day >= bday) && (month == bmonth && year == byear) || !(month >= bmonth) && (year == byear) || !(year >= byear) || (day == bday && month == bmonth && year == byear) && !(hour >= bhour) || (day == bday && month == bmonth && year == byear && hour == bhour) && !(minute >= bminute) || (day == bday && month == bmonth && year == byear && hour == bhour && minute == bminute) && !(second >= bsecond))
{
// Player is banned
}
EDIT: b prefix is for ban date and time

