Jump to content
  • 0

Displaying times.


TheKezStrel

Question

Hi all,

 

I'm trying to write an event triggered on login to read a last system time(ms) variable to output the players last login time to the chatbox.

It successfully places the last login time to the variable, and successfully reads the variable and outputs the (ms) value to the chatbox as millisecond values, though this means nothing to the players nor myself. Is there any way I can use this (ms) time and convert it to a human readable format like dd/mm/yyyy hh:mm to display in the chat box??

 

Thanks in advance y'all.

TheKezStrel

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Not without doing an event that would see how many times you can subtract 86400000 from the variable to get days, and then subtract 3600000 as many times as it can to find hours, then subtract 60000 as many times as you can to get minutes, and then subtract 1000 as many times as you can to get seconds.  That's the only way I can think of accomplishing that at this time.

 

Major event upgrades that would be more suitable for doing this automatically will happen post-source release.

 

 

Link to comment
Share on other sites

×
×
  • Create New...