Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- meta.xml
- <meta>
- <script src="client.lua" type="client"/>
- </meta>
- -- client.lua
- local screenW, screenH = guiGetScreenSize()
- local newScale = dxGetFontHeight (screenW/30000 , "pricedown" )
- local left = screenW * 0.8764
- local top = screenH * 0.0067
- local right = screenW * 0.9966
- local bottom = screenH * 0.0267
- function drawTime()
- local realTime = getRealTime()
- local hours = string.format("%02d",realTime.hour)
- local minutes = string.format("%02d",realTime.minute)
- local seconds = string.format("%02d",realTime.second)
- local text = "Real Time : "..hours..":"..minutes..":"..seconds
- dxDrawText(text ,left - 1, top - 1, right - 1 , bottom - 1, tocolor(0, 0, 0, 255), newScale, "default", "center", "center", false, true, true, false, false)
- dxDrawText(text ,left + 1, top - 1, right + 1 , bottom - 1, tocolor(0, 0, 0, 255), newScale, "default", "center", "center", false, true, true, false, false)
- dxDrawText(text ,left - 1, top + 1, right - 1 , bottom + 1, tocolor(0, 0, 0, 255), newScale, "default", "center", "center", false, true, true, false, false)
- dxDrawText(text ,left + 1, top + 1, right + 1 , bottom + 1, tocolor(0, 0, 0, 255), newScale, "default", "center", "center", false, true, true, false, false)
- dxDrawText(text ,left, top, right, bottom, tocolor(255, 255, 255, 255), newScale, "default", "center", "center", false, true, true, false, false)
- end
- addEventHandler("onClientRender", getRootElement(), drawTime)
Add Comment
Please, Sign In to add comment