Jump to content

مشكلة عدم تحديث الوقت


Aesony!

Recommended Posts

    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
    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
إستعمل 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
يعطيك الف عافية بس لو تعرف عملية اعدل فيها الوقت بدل من 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 by Guest
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...