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? Link to comment https://forums.phpfreaks.com/topic/32160-help-d/ 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? Link to comment https://forums.phpfreaks.com/topic/32160-help-d/#findComment-149251 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] Link to comment https://forums.phpfreaks.com/topic/32160-help-d/#findComment-149252 Share on other sites More sharing options...
marcus Posted December 30, 2006 Author Share Posted December 30, 2006 bump thing Link to comment https://forums.phpfreaks.com/topic/32160-help-d/#findComment-149720 Share on other sites More sharing options...
trq Posted December 30, 2006 Share Posted December 30, 2006 What is your question? Link to comment https://forums.phpfreaks.com/topic/32160-help-d/#findComment-149724 Share on other sites More sharing options...
marcus Posted December 30, 2006 Author Share Posted December 30, 2006 Look up :D Link to comment https://forums.phpfreaks.com/topic/32160-help-d/#findComment-149725 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.