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

Time-request as a Vote Plugin

Discussion in 'Development' started by b3st_Thunder78, Jun 29, 2019.

  1. b3st_Thunder78

    b3st_Thunder78 Spider Jockey

    Messages:
    38
    Hallo ich bin dabei ein vote plugin zu programieren aber mann soll/kann diesen Command nur alle 24h ausführen also so gesehen meine frage ist wie man eine zeit abfrage machen kann?
    Danke im Voraus
     
  2. Swourire

    Swourire Spider Jockey

    Messages:
    49
    GitHub:
    swourire
    This forum is english only !
     
  3. b3st_Thunder78

    b3st_Thunder78 Spider Jockey

    Messages:
    38
    Here
    Hello I'm about to program a vote plugin but man should / can run this command only every 24h so seen my question is how to make a time query?
    thank you in advance
     
  4. Swourire

    Swourire Spider Jockey

    Messages:
    49
    GitHub:
    swourire
    I would suggest storing the data of the last voted with time function (https://www.php.net/manual/en/function.time.php) and add 1 day as seconds, then, when a player runs the command check if timeStored < timeRigthNow if yes update the stored data with time and if no send the error message.
     
    HimbeersaftLP likes this.
  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.