Jump to content

help getrealtime


Recommended Posts

Could someone to help? I've put the date and the month of the wiki is incorrect then I put +1 finally the script did not work

-- # Client Side : 
local x,y = guiGetScreenSize( ) 
local left,top,right,bottom = x*560/1360,y*550/768,x*0/1360,y*30/768 
  
addEventHandler("onClientRender",root, 
    function() 
        local RealTime = getRealTime ( ) 
        local hours = RealTime.hour 
        local minutes = RealTime.minute 
        local seconds = RealTime.second 
        local dia = RealTime.monthday 
        local mes = RealTime.month +1 
        local ano = Realtime.year 1900 
            dxDrawText(hours..":"..minutes..":"..seconds,left+220,top+100,right,bottom,tocolor(255,255,255,255),1,"sans") 
            dxDrawText(dia.."/"..mes.."/"..ano,left+220,top+110,right,bottom,tocolor(255,255,255,255),1,"sans") 
    end 
) 

Link to comment
@ Line 13 :

Replace it with this :

local ano = RealTime.year +1900 
-- # Client Side : 
local x,y = guiGetScreenSize( ) 
local left,top,right,bottom = x*560/1360,y*550/768,x*0/1360,y*30/768 
  
addEventHandler("onClientRender",root, 
    function() 
        local RealTime = getRealTime ( ) 
        local hours = RealTime.hour 
        local minutes = RealTime.minute 
        local seconds = RealTime.second 
        local dia = RealTime.monthday 
        local mes = RealTime.month +1 
        local ano = Realtime.year +1900 
            dxDrawText(hours..":"..minutes..":"..seconds,left+220,top+100,right,bottom,tocolor(255,255,255,255),1,"sans") 
            dxDrawText(dia.."/"..mes.."/"..ano,left+220,top+110,right,bottom,tocolor(255,255,255,255),1,"sans") 
    end 
) 

not worked the script

@edit

understood RealTime was tiny, thanks

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...