Hi, i'm trying to draw DX Rectangle and fit it with all screen resolutions but i can't figure what's wrong with rectangle it seems doesn't fit, here's the code :
local sWidth, sHeight = guiGetScreenSize()
local sx, sy = sWidth/1280, sHeight/720
addEventHandler("onClientRender", root,
function()
dxDrawRectangle(sx*506, sy*616, sx*297, sy*76, tocolor(0, 0, 0, 133),true)
dxDrawText("Team 1 Score: 0", sx*556, sy*626, sx*793, sy*650, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("Team 2 Score: 0", sx*556, sy*658, sx*793, sy*682, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "left", "top", false, false, true, false, false)
end
)
as you can see here it's fine with res 1280 * 720
http://image.prntscr.com/image/402d0c42b10341c2be6bc64d90498aca.png
and here with res 800 * 600
http://image.prntscr.com/image/24f660b05d2243a6916d4d42d392bf96.png