^_^ LOL ^_^ Posted December 19, 2013 Share Posted December 19, 2013 The problem is when i have on my resolutions all positions is okey Photo: If i change on another resolutions, hes just disepher Photo: Sorry for bad english. Link to comment
PaiN^ Posted December 19, 2013 Share Posted December 19, 2013 (edited) That's because you're using absolute coordinates for the screen position . You need to make them relative . Since you're using DX - functions ( which can only have absolute values as coordinates ), I would do something like this : local position_x, position_y = 0.05, 0.05 -- set the position in relative coordinates, then convert the coordinates to absolute . function RelativeToabsolute( x, y ) if type( x ) ~= "number" or type( y ) ~= "number" then return false end local screen = { guiGetScreenSize( ) } x = x * screen[1] y = y * screen[2] return x, y end function dx_draw( ) local x, y = RelativeToabsolute( position_x, position_y ) dxDrawText( "Hello", x, y, ... ) end addEventHandler( "onClientRender", root, dx_draw ) Edited December 19, 2013 by Guest Link to comment
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