3B00DG4MER Posted October 17, 2014 Share Posted October 17, 2014 Hi,Today I've made a Admin Panel (For my server with MySQL) I've stopped working at a problem (Ban System) i can't get the time after 10 mins or 1 hour or 10 days or 1 year Here's my code I've tried local time = guiGetText(ban.edit[2]) -- Mins local realtime = getRealTime() local timestamp = realtime.timestamp date = timestamp + time Link to comment
Arsilex Posted October 17, 2014 Share Posted October 17, 2014 local time = guiGetText(ban.edit[2]) -- Mins local realtime = getRealTime() local timestamp = realtime.timestamp date = timestamp + time*60000 Link to comment
3B00DG4MER Posted October 19, 2014 Author Share Posted October 19, 2014 local time = guiGetText(ban.edit[2]) -- Mins local realtime = getRealTime() local timestamp = realtime.timestamp date = timestamp + time*60000 and what about 'hours' and 'Days' and 'Months' and 'Years' It's going hard... Link to comment
Arsilex Posted October 19, 2014 Share Posted October 19, 2014 something like this local time = guiGetText(ban.edit[2]) -- Mins local realtime = getRealTime() local timestamp = realtime.timestamp if time*60000 < 60 then date = timestamp + time*60000 elseif time*3600000 < 24 and time*3600000 > 1 then date = timestamp + time*3600000 elseif time*86400000 < 30 and time*86400000 > 1 then date = timestamp + time*86400000 end not sure if will works.. Link to comment
3B00DG4MER Posted October 20, 2014 Author Share Posted October 20, 2014 something like this local time = guiGetText(ban.edit[2]) -- Mins local realtime = getRealTime() local timestamp = realtime.timestamp if time*60000 < 60 then date = timestamp + time*60000 elseif time*3600000 < 24 and time*3600000 > 1 then date = timestamp + time*3600000 elseif time*86400000 < 30 and time*86400000 > 1 then date = timestamp + time*86400000 end not sure if will works.. Thanks i'll try it later 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