-- Okay, so you have to pick a base resolution, you should choose what you use.
local baseWidth, baseHeight = 1920, 1080 -- I pick fullhd
-- We'll need the current resolution
local screenWidth, screenHeight = guiGetScreenSize() -- imageine this is 1366x768 now
-- and now we have to calculate the difference ratio between the base- and current resolution
local xDiffRatio, yDiffRatio = screenWidth/baseWidth, screenHeight/baseHeight -- this will be: (1920/1366=1.40556) and (1080/768=1.40625)
-- then we have to multiply every (X-coordinate and Width with 'xDiffRatio') and every (Y-coordinate and Height with 'yDiffRatio') -> this will resize everything (ofcourse if base- and current resolution is equals, then it doesn't change)
-- now draw the image
local imageX, imageY = 1645, 500
local imageWidth, imageHeight = 64, 64
-- miltiply values with the right ratio
dxDrawImage(imageX*xDiffRatio, imageY*yDiffRatio, imageWidth*xDiffRatio, imageHeight*yDiffRatio, "images/hud/adm_on.png")
-- NOTE: you can make your life easier if you create a "custom" dxDrawImage event what do the math for you, call it 'myDrawImage'
function myDrawImage(x, y, width, height, ...) -- three dot means (...) every parameter after 4th, this is a "magic parameter"
dxDrawImage(x*xDiffRatio, y*yDiffRatio, width*xDiffRatio, height*yDiffRatio, ...) -- and don't forget the dots
end
-- and now you can use your new function
myDrawImage(imageX, imageY, imageWidth, imageHeight, "images/hud/adm_on.png")