Jump to content

guiGetScreenSize


Chaz-CR

Recommended Posts

Hello everybody, i was trying to add some labels to the screen about normal information (Location, Server Name, Fps and Ping). So I found out that they has guiGetScreenSize but when I change the resolution it seems weird. Not as I made it. So I wanted to know how to make the "maths" of this function to get the same place in different resolutions.

CODE I MADE.

addEventHandler("onClientRender", root, 
    function() 
    local sx,sy = guiGetScreenSize() 
        dxDrawText("AGE Of BATTLES", sx*673/800, sy*550.5/600,  sx*0/800, sy*0/600, tocolor(0, 109, 132, 255), 1.3, "pricedown", "left", false, false, false, false, false, false) 
end 
) 

Link to comment
local sx,sy = guiGetScreenSize() 
addEventHandler("onClientRender", root, 
function() 
    dxDrawText("AGE Of BATTLES", sx*(673/800), sy*(550.5/600),  sx*(0/800), sy*(0/600), tocolor(0, 109, 132, 255), 1.3, "pricedown", "left", false, false, false, false, false, false) 
end 
) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...