Aesony! Posted September 17, 2014 Share Posted September 17, 2014 local ho = getRealTime().hour -- كود الوقت local mi = getRealTime().minute local se = getRealTime().second wht = guiCreateLabel(104, 94, 75, 15, ""..ho..":"..se, false, aesony) -- المشكلة الوقت ما يتحرك Link to comment
AboShanab Posted September 17, 2014 Share Posted September 17, 2014 إستعمل onClientRender Link to comment
Aesony! Posted September 17, 2014 Author Share Posted September 17, 2014 local x,y = guiGetScreenSize() local width,height = 200, 100 x = x-width y = y-height aesony = guiCreateWindow(x,y,width,height, "الوقت", false) local ho = getRealTime().hour local mi = getRealTime().minute local se = getRealTime().second local th, tm = getTime() wht = guiCreateLabel(50, 50, 75, 15, ""..mi..":"..se, false, aesony) -- حطيت الدقايق والثواني بس ما يتحركوا guiSetVisible (aesony, false) function OpenWin() if guiGetVisible (aesony ) then guiSetVisible ( aesony, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( aesony, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("f4", "down", OpenWin) Link to comment
iKSApro Posted September 17, 2014 Share Posted September 17, 2014 addEventHandler('onClientRender',root, function() if ( guiGetVisible(wht) == true ) then local ho = getRealTime().hour local mi = getRealTime().minute local se = getRealTime().second guiSetText(wht,''..mi..':'..se..'') end end ) Link to comment
King12 Posted September 17, 2014 Share Posted September 17, 2014 إستعمل onClientRender مايحتاج ريندر تقدر تسويها بالتايمر local x,y = guiGetScreenSize() local width,height = 200, 100 x = x-width y = y-height aesony = guiCreateWindow(x,y,width,height, "الوقت", false) wht = guiCreateLabel(50, 50, 75, 15, "", false, aesony) guiSetVisible (aesony, false) setTimer(function () local time = getRealTime ( ) local hours = time.hour local minute = time.minute local second = time.second if hours > 24 then hours = hours - 24 end guiSetText(wht,tostring(hours).." : "..tostring(minute).." : "..tostring(second)) end,1000,0) function asd() if guiGetVisible (aesony ) then guiSetVisible ( aesony, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( aesony, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F4", "down", asd) Link to comment
Aesony! Posted September 17, 2014 Author Share Posted September 17, 2014 يعطيك الف عافية بس لو تعرف عملية اعدل فيها الوقت بدل من 24 الى 12 Link to comment
King12 Posted September 17, 2014 Share Posted September 17, 2014 (edited) يعطيك الف عافية بس لو تعرف عملية اعدل فيها الوقت بدل من 24 الى 12 local x,y = guiGetScreenSize() local width,height = 200, 100 x = x-width y = y-height aesony = guiCreateWindow(x,y,width,height, "الوقت", false) wht = guiCreateLabel(50, 50, 95, 15, "", false, aesony) guiSetVisible (aesony, false) setTimer(function () local time = getRealTime ( ) local hours = time.hour + 1 local minute = time.minute local second = time.second if hours > 13 then hours = hours - 13 end guiSetText(wht,"The time is : "..tostring(hours).." : "..tostring(minute).." : "..tostring(second)) end,1000,0) function asd() if guiGetVisible (aesony ) then guiSetVisible ( aesony, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( aesony, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F4", "down", asd) Edited September 17, 2014 by Guest Link to comment
Aesony! Posted September 17, 2014 Author Share Posted September 17, 2014 شكراً لك تمت الافادة Link to comment
King12 Posted September 17, 2014 Share Posted September 17, 2014 شكراً لك تمت الافادة العفو , بالخدمه .. 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