How to calculate time?
#1

Hello! I made a ban command with duration parameter. Now, I need to check is player still banned, but I don't know how to. In "bans" table in database I made a "Banned On" DATETIME field, and "Duration" INT field, because duration is expressed in hours. So, this is a pseudocode of what I want:

Код:
Player connects
    Get "Banned On" and "Duration" field from database
    Compare "Banned On" + "Duration" with the current time < This is my problem

    If the ban didn't expire
           Ban player again for "ban evading"
Reply


Messages In This Thread
How to calculate time? - by Luka P. - 19.02.2012, 14:10
Re: How to calculate time? - by FuTuяe - 19.02.2012, 14:17
Re: How to calculate time? - by Luka P. - 19.02.2012, 14:41

Forum Jump:


Users browsing this thread: 1 Guest(s)