Jump to content
  • 0
Sign in to follow this  
TheKezStrel

Displaying times.

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

Share this post


Link to post
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.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×