1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Timer Code

Discussion in 'Development' started by Soubeere, Dec 9, 2016.

  1. Soubeere

    Soubeere Creeper

    Messages:
    1
    Hi, I need a time code for my presentws plugin (Each day the player enters gets some item)
     
  2. LilCrispy2o9

    LilCrispy2o9 Spider Jockey

    Messages:
    43
    GitHub:
    lilcrispy2o9
    Just create a database that stores a time for each player. if a player trys to claim, and it has been 24 hours since their last present claim, set their value to to the current time and award the prize.
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    We already have many similar threads here. Mind searching?
     
  4. kaliiks

    kaliiks Zombie

    Messages:
    250
    PHP:
    for ($i=30$i>1$i--) {
    $player->sendMessage("Game start in"$i );
    if(
    $i == 0) {
    $sender->sendMessage("Started");
    Now is startime 30 if you want change it change $i= starttime and $i>starttime + 1;
     
    Last edited: Dec 11, 2016
  5. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Uhm this is not what he meant at all. :p You can't go count 24 hours in a task to do that. What if the server restarts?
     
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    This is totally irrelevant to what this thread is about!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.