Jump to content


I'm making this game

  • Please log in to reply
1 reply to this topic

#1 Patman_

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 05 April 2006 - 08:56 AM

I’m making this game where the players can take different assignments.
The players can travel to different cities and bring stuff from one city to the next. The players can’t bring all of the stuff in one trip so they have to travel between the two cities a couple of times to finish the assignment.

How do I make (with sql and php):
A time limiter (if you bring half of the stuff from a city to the other and if you travel back to get the other half within the next 15 minutes you get the error: “You did a part of this assignment under 15 minutes ago. Please try again later”)
It must be time on the server and not local so the players can’t cheat easy.

How do I make (with sql and php):
When the players have finished the assignment they get the message “You have made the assignment. You may try the next assignment”.

#2 wickning1

  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 05 April 2006 - 12:04 PM

It's hard to give you specifics, but MySQL has plenty of good date math abilities. For instance, queries that use something like "WHERE mydatestamp < NOW() - INTERVAL 15 MINUTE" are very useful.

See here for more:
[a href=\"http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/5.0/en/dat...-functions.html[/a]

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users