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
      2moons 2.0 OPEN Demo
      Thank you to send by ticket or message or via the forum in the part made for this purpose for all problems.

      Download version 2.0 here
      Shop Mods and Games HERE

      -------------------------------------------------------
      My personal game
      OUnivers - Open
      Xterium - Comming Soon - No code is taken from available versions
    • 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
      2moons 2.0 OPEN Demo
      Thank you to send by ticket or message or via the forum in the part made for this purpose for all problems.

      Download version 2.0 here
      Shop Mods and Games HERE

      -------------------------------------------------------
      My personal game
      OUnivers - Open
      Xterium - Comming Soon - No code is taken from available versions
    • 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
      2moons 2.0 OPEN Demo
      Thank you to send by ticket or message or via the forum in the part made for this purpose for all problems.

      Download version 2.0 here
      Shop Mods and Games HERE

      -------------------------------------------------------
      My personal game
      OUnivers - Open
      Xterium - Comming Soon - No code is taken from available versions