[REQ] Playtime checker

Discussion in 'Archived: Plugin Requests' started by Reteckz, Feb 24, 2013.

  1. Offline

    Reteckz

    Hello!

    I have Logblock on my server (grief-rollback), which also logs time into my database.
    My question is:
    Would someone be so kind to create a plugin where you can type: /playtime [name], and it then connects with the database you setup in the config, use the database command:
    SELECT onlinetime FROM lb-players WHERE playername = '(Name variable given by the /playtime [name] command)'.
    As the onlinetime you will get is in seconds, something like the following:

    hours = 0;
    minutes = 0;
    seconds = 0;
    While (onlinetime-3600>=0) {
    hours++;
    onlinetime = onlinetime - 3600;
    }
    While (onlinetime-60>=0) {
    minutes++;
    onlinetime = onlinetime - 60;
    }
    While (onlinetime!=0) {
    seconds++;
    onlinetime = onlinetime - 1;
    }

    Then print in chat for the person that used the command: [Name] Has played for ?h ?m ?s

    Contact me for more information if you need it, and if you want to play on my server after creating this, you will get a 25$ donator rank :3
     
  2. Offline

    puppy3276

    I might do this.
     
  3. Offline

    psychic94

    I think my plugin, Activity History can do this, but I cant recall because I haven't updated in a while. It has a lot more functions though and soon I'll be implementing SQL.
     
  4. Offline

    Reteckz

  5. Offline

    Edge209

Share This Page