Jump to content

nibor

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nibor's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. in my php made game. I'm having trouble on how it would automatically reset and refresh players stats every 12 hours. the reset file i made which codes are below. It only works when i manually run that script which is going to reset.php file. Can someone please help me out, , want it to reset from server time 0:00:00 and every 12 hours, it would refresh again automatically. [code] $a=mysql_query("SELECT id,name FROM members"); while($b=mysql_fetch_array($a)){ $msg="A New Day Has Come, You Have Been Awarded <b>500</b> Buds"; mysql_query("INSERT INTO news (who,message,date) VALUES ('$b[id]','$msg','".time()."')"); } mysql_query("UPDATE members SET bank=bank+500"); mysql_query("UPDATE members SET daysplayed=daysplayed+1"); mysql_query("UPDATE clan SET age=age+1"); mysql_query("UPDATE members SET stamina=maxstamina"); mysql_query("UPDATE members SET powerball=maxpowerball"); mysql_query("UPDATE members SET life=maxlife"); [/code] Thanks - saizen
×
×
  • Create New...

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.