local sX, sY = guiGetScreenSize()
local customFonts = dxCreateFont("Roboto-Light.ttf", 82, true)
local scale = {(sX/1920) * (sY/1080)}/2
local R, G, B = 255, 255, 255
function drawRects()
--dxDrawRectangle(0, 0, sX*0.104, sY*0.185, tocolor(R, G, B))
--dxDrawRectangle(sX*0.104, 0, sX*0.104, sY*0.185, tocolor(0, 255, 0))
dxDrawText("Hello There!", 0, 0, sX, sY, tocolor(R, G, B) , scale*0.5, customFonts "right", "bottom")
end
addEventHandler("onClientRender", root, drawRects)
function changeColor(_, r, g, b)
R, G, B = r, g, b
end
addCommandHandler("rekt", changeColor)
I want to print a text on the screen, but I get this error.
ERROR : dxDrawText/text.Lua:5: attempt to perform arithmetic on a table value