Jump to content

Position is not accurate...


GTX

Recommended Posts

Hello, I got confused with setting positions, so I'll explain. I've got resolution 1680x1050 and the text is on the right position but when I change it to for example 800x600 then the text isn't showing. Here's the code:

  
function dx() 
    sx, sy = guiGetScreenSize() 
    dxDrawText("dx 24/7 text DD/DM", (754/1024)*sx-50, (228/768)*sy-290, (732/1024)*sx, (258/768)*sy, tocolor(255,255,255,255), (sx/1024)*0.8, "bankgothic") 
end 
addEventHandler("onClientRender", getRootElement(), dx) 
  

Thanks in advance

Link to comment

There you go my best friend:

function dx() 
sx, sy = guiGetScreenSize() 
dxDrawText("dx 24/7 text DD/DM",0,0,sx,sy,tocolor(255,255,255,255), (sx/1024)*0.8, "bankgothic", "right","top") 
end 
addEventHandler("onClientRender", getRootElement(), dx) 
  

A little idea Venom taught me. I hope all is well with xG, i do miss you. This code will work on all res's MWAHHAAHAHAHHAHAHA

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...