StefanAlmighty Posted June 1, 2016 Share Posted June 1, 2016 Hi, is there a way to convert the UNIX from getResourceLastStartTime to seconds? So for example it would output how many seconds ago the resource was last started rather than the UNIX. Link to comment
Castillo Posted June 2, 2016 Share Posted June 2, 2016 Wiki says: Use in conjunction with getRealTime in order to retrieve detailed information. Link to comment
KariiiM Posted June 2, 2016 Share Posted June 2, 2016 Yes it's possible to do that, I wrote this example for you hope it can help, addCommandHandler ( "when", function ( player ) local startTime = getResourceLastStartTime ( getThisResource ( ) ) outputChatBox ( "This resource was started on: " .. ( getRealTime ( ).timestamp - startTime ) .." seconds ago", player, 255,255,0 ) end ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now