saluta Posted September 1, 2021 Posted September 1, 2021 Spoiler Spoiler Hi, please help. server.lua I want to add a clock for thin to show the clock. And the time was taken from the host, I was told to add to the server side, I added, but errors come out. function UpdateTime() local GilroyMediumItalic = dxCreateFont("Gilroy-MediumItalic.ttf", 30) local screenW,screenH = guiGetScreenSize() local px,py = 1366,768 local x,y = (screenW/px), (screenH/py) setMinuteDuration( 60000 ); local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second if (minutes >= 0 and minutes < 10) then minutes = "0"..time.minute end dxDrawBorderedText(hours..":"..minutes, x*1300, y*160, x*1360, y*40, tocolor(255,255,255,255), 0.5, GilroyMediumItalic, "center", "center", false, false, false, false, false) end setTimer( UpdateTime, 60000, 0 );
Discord Moderators Zango Posted September 1, 2021 Discord Moderators Posted September 1, 2021 Make sure the script is set to type="client" in meta.xml Like this <script src="client.lua" type="client" />
lyncon Posted September 3, 2021 Posted September 3, 2021 The GUI and DX functions do not work on files of the "shared" type, they only work on the "client" type. See the @Zango example above.
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