Jump to content

Convert Time


Z4Zy

Recommended Posts

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 ??:S [ ex :- 13:30 ==> 1.30 PM , 18:00 ==> 6.00 PM ]

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...