Hi, i'm making a php text based browser based game (good description!) similar to that of www.mobstar.cc and www.mafia.org.
So far, i have a script which is basically a form, with options as radio buttons, so someone can select a crime, and then i have some script that sees if they are experience enough to do the crime (if not generates a random number that is basically luck). from this, i have more php code that generates how much money they have earned from this crime.
But what i need to do now is for a time to be put into a database, which basically states when they can next commit a crime.
So it would go something like this in an alogorthim (can't spell) for when the crime is succesful :
if crime = success
money = rand(0,250)
time till next crime = current time + 5 mins
end if statement
Now when the user goes to do the crime again, i need the time to be taken from the database, and set as a variable with, again the following alogorithm:
if time till next crime < current time
echo "You can't commit any crime"
else
display crime form
end if statement
If anyone can help, it will be most appreciated, and your name on this forum will be entered into the credits for the game when its finished and released.
Thanks goes to LordShryku for his help with my crime script!