marcus Posted December 29, 2006 Share Posted December 29, 2006 I am making a game with some people and we are stuck on how we would do a restock system.Our only idea was to run a cron every 1 minute and if the set number in the database equaled the one in the cron then it would run. Also, with the items, I were thinking of an array rand.Have an array with like 1 = item number 1, 5 = item#5 etc...And have a random number between 10 and 20 and then have it insert into the database. If somebody bought the item then it would take it remove it from the database. Is this all anywheres possible? Quote Link to comment Share on other sites More sharing options...
trq Posted December 29, 2006 Share Posted December 29, 2006 Anythng is possible but your description is pretty vague. What part are you stuck on exactly? Quote Link to comment Share on other sites More sharing options...
marcus Posted December 29, 2006 Author Share Posted December 29, 2006 Basically making the items show, I'm stuck on how to do it. (I know I could do a while statement).Well more in less, actually get it to restock[code=php:0]if($time = $row[time]){//restock it}else {die();}[/code] Quote Link to comment Share on other sites More sharing options...
marcus Posted December 30, 2006 Author Share Posted December 30, 2006 bump thing Quote Link to comment Share on other sites More sharing options...
trq Posted December 30, 2006 Share Posted December 30, 2006 What is your question? Quote Link to comment Share on other sites More sharing options...
marcus Posted December 30, 2006 Author Share Posted December 30, 2006 Look up :D Quote Link to comment 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.