Results 1 to 2 of 2

Thread: Countdown

  1. #1
    Join Date
    Aug 2004

    Exclamation Unanswered: Countdown

    I am currently creating an Online RPG. My next module that I would like to add is a \"crimes\" section. Whereby you commit crimes in order to gain more money and experience. The majority of this I can handle, but I would like a timer interval between the times you can commit crimes. (So you commit a crime and then have to wait two minutes before you can commit another one). Is there anyway to write a countdown timer in a MySQL database which I can call and it will display the amount of time left until you can commit another crime.

    Hopefully, this is possible. If not maybe a workaround which will have the same effect. NOTE: I would not like to use the Sleep() code.

    Thanks for any help you can provide,


  2. #2
    Join Date
    Apr 2005
    Baltimore, MD
    I'm not totally sure, but I believe there is a date/time function that will return the difference between two times. I'm not at my workstation, so can't test/double check syntax but something along the lines of this should be a good start.

    Assuming you store each crime (and date) in the database. I'm probably wrong on the function name, but check the date and time functions in the docs for better info.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts