Time and DB table updates when creating a mod!

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Time and DB table updates when creating a mod!

      Hello! I'm willing to create a some sort of lottery mod that has a general time and there are 2 types of lotteries that players can join. In each of them they can get points and the player with the most points when lottery_time expires wins.

      The question is where to put function that checks if lottery_time < timestamp and then add dark_matter to winner and reset whole table and add 3600s to lottery time? Should I write it in the cronjobs.php or can I write it in the page.php?
    • a lottery is already available on the forum look how it works
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      Spaccon
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon
    • Thanks, but. The idea is a bit different it isn't like lottery and also I would like to understand coding better by doing it myself.

      Are the page.php functions loaded and executed only when somebody opens that page or am I wrong?
    • There are changes that a player visits the page
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      Spaccon
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon
    • What would you suggest as the best way to ensure that functions work even if nobody visits that page? Can I somehow put in the cronjobs line that executes page.php if lottery_time < TIMESTAMP or is there a better way?
    • Made by the cron it's the best
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      Spaccon
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon