..:D&G:.. Posted November 2, 2013 Share Posted November 2, 2013 (edited) Hey everyone, I am working on a phone-system, and I need a bit of help. This is how my phone looks like: I want to add a date and a clock to it, and want it to look something like this: I don't know if this helps, but this is the phone in client side: local wPhoneMenu, gRingtones, ePhoneNumber, bCall, bOK, bCancel local sx, sy = guiGetScreenSize() local p_Sound = {} local stopTimer = {} function showPhoneGui(itemValue) wPhoneMenu = guiCreateStaticImage(sx/2 - 125,sy/2 - 175,250,450,"phone.png",false) cCall = guiCreateButton(0.5280,0.2378,0.2966,0.0556,"Suna",true,wPhoneMenu) bNumbers = guiCreateButton(0.1480,0.2378,0.2966,0.0555,"Numere",true,wPhoneMenu) bRingtones = guiCreateButton(0.1480,0.3222,0.2966,0.0555,"Setari",true,wPhoneMenu) bCancel = guiCreateButton(0.3880,0.8667,0.2200,0.0933,"Iesi",true,wPhoneMenu) guiGridListSetSelectedItem(gRingtones, itemValue, 1) guiSetAlpha(bCancel,0) addEventHandler("onClientGUIClick", getRootElement(), onGuiClick) showCursor(true) end addEvent("showPhoneGUI", true) addEventHandler("showPhoneGUI", getRootElement(), showPhoneGui) I am not good at timers and dates, so if anyone can give me a hand, would be grate. Edited November 2, 2013 by Guest Link to comment
xXMADEXx Posted November 2, 2013 Share Posted November 2, 2013 Use the function: getRealTime ( ) Link to comment
..:D&G:.. Posted November 2, 2013 Author Share Posted November 2, 2013 Ok now, how about the date? Link to comment
xXMADEXx Posted November 2, 2013 Share Posted November 2, 2013 Ok now, how about the date? That is also included in getRealTime(). If you read the argument for it, it'll show you. It provides any type of time you need. Second;Minute;Hour;Day;Month;Year etc.. 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