Z4Zy Posted May 31, 2018 Posted May 31, 2018 Hi There ! Below code draw a DX text with Real World Time. function time () local time = getRealTime() local hours = time.hour local minutes = time.minute dxDrawRectangle (112, 468, 134, 47, tocolor(0, 0, 0, 150)) dxDrawText (hours..":"..minutes, 146, 476, 304, 536, tocolor(255,255,255), 2) end addEventHandler ( "onClientRender", root, time ) This time is in digital clock [ ex :- 1.30 PM ==> 13:30 , 6.00 PM ==> 18:00 ] And how to convert it to analog clock ?? [ ex :- 13:30 ==> 1.30 PM , 18:00 ==> 6.00 PM ]
AJXB Posted May 31, 2018 Posted May 31, 2018 You mean it's 12 hours based and you want it 24 hours based? ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
WiBox Posted May 31, 2018 Posted May 31, 2018 (edited) He mean, if the Time in real world was 14:00 he want it to show as 2:00PM And same from 2:00PM he want it to show as 14:00 Edited May 31, 2018 by SSKE
AJXB Posted May 31, 2018 Posted May 31, 2018 if (hour > 12) then hour = hour-12 end Isn't it this simple? From 00:00 to 12:00 that's morning, so it's AM, after 12:00 it's all PM ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
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