BenceV3 Posted September 2, 2020 Share Posted September 2, 2020 (edited) Hi. Im having problems getting the minutes left until unban. Im using the MTA’s ban system, i have tried with getUnbanTime(ban), but it didnt work. I want to get the time left in minutes. Can someone help me solving my problem? Edited September 2, 2020 by BenceV3 Link to comment
Overkillz Posted September 2, 2020 Share Posted September 2, 2020 Probably you are getting the seconds. If you want to get the minutes you have to convert the seconds in minutes ...etc Quote Returns an integer of the unbanning time in the format of seconds from the year 1970. Use in conjunction with getRealTime in order to retrieve detailed information. Regards. 1 Link to comment
BenceV3 Posted September 3, 2020 Author Share Posted September 3, 2020 Just like you said, but i am having problems exactly in converting the unban time to real time. I got a datetime, but I had problem with counting this datetime to minutes. I tried with seeing the difference between the unban datetime and now, but it didnt work. @Overkillz Link to comment
فاّرس Posted September 3, 2020 Share Posted September 3, 2020 You could use getRealTime, see the first argument "seconds". 1 Link to comment
BenceV3 Posted September 3, 2020 Author Share Posted September 3, 2020 (edited) I got it working. Thanks for the replies. [Solved] Edited September 3, 2020 by BenceV3 1 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