Jump to content

Archived

This topic is now archived and is closed to further replies.

Patman_

I'm making this game

Recommended Posts

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.

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”.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.