Universal World time command

Discussion in 'Plugin Requests' started by T.J., Apr 6, 2016.

  1. Can someone create a plugin for in-game time which could be checked by /time so that way when we host events we can just say " Event will be hosted at 14:00 IG-TIME /time to see the time " This would save me from having to write timezones, and have people figure out what time it is in their timezone, etc...

    I'm sure this would be a good plugin addition for the Hurtworld community. Unless something like this already exist but I've looked through all the plugins and see nothing like this.
     
  2. Why not just use a timestamp with DateTime so people can type /time and have it say the event will occur in xx hours:minutes?
    The day/night cycle in game is very quick, depending on your settings. So that may make the in-game time a little too frequent.
     
  3. Well I figured a IN-GAME clock would just tick on a timer, and be IN-GAME time not an actual time but it would run up to 24:00 or so like some RPG's have for events they'll announce that an event will be hosted, somewhere at 13:00 on april 6th, 2016 you know. So you log into the game, view the time and you know how long you have to wait.

    I don't actually mean make the time go by the time manager; instead a separate plugin with it's own timer maybe.
     
  4. So just have a command to display the server's time. By using System.DateTime.Now.ToString()
    Then if you say an event is at 8pm they can just see what the servers time is with the command.

    If you want to remove the date and just display the time, change ToString() to .ToString("HH:mm:ss").
    If you want 12 hour time use: .ToString("hh:mm:ss tt")

    Example:
    Code:
    [ChatCommand("time")]
    void timeCommand(PlayerSession session)
    {
        hurt.SendChatMessage(session, "Server time is: "+System.DateTime.Now.ToString("hh:mm:ss tt"));
    }
     
  5. Nice, thanks! I didn't notice this until I actually extracted the assembly dll because I'm not a plugin maker myself, then as I was going through it to get a feel for plugins I noticed they have a built-in time thing; then I felt a little stupid for asking... But to the average person; without knowing about the assembly file, you really don't know what "capabilities" hurtworld can offer for plugins.

    Thanks though, appreciate the timely and good reply! Kudos+