Patman_ Posted April 5, 2006 Share Posted April 5, 2006 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”. Quote Link to comment https://forums.phpfreaks.com/topic/6644-im-making-this-game/ Share on other sites More sharing options...
wickning1 Posted April 5, 2006 Share Posted April 5, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/6644-im-making-this-game/#findComment-24153 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.