Jump to content

turtly

Members
  • Posts

    3
  • Joined

  • Last visited

Details

  • Gang
    Ballas

turtly's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. I really don't get it, sorry. I tried to move it to the right side of my screen without any success. What values do I change to move it? Here is my code now: local x,y = guiGetScreenSize() -- Get screen resolution. local sx, sy = guiGetScreenSize() local yourScreenWidth, yourScreenHeight = guiGetScreenSize () -- Let's suppose the position and the size is 500, 250, 500, 250 We divide 500 by our width screen size, and 250 by our height screen size it will give a relative position like 0.5. local rx, ry, rsx, rsy = 0.05 / yourScreenWidth, 250 / yourScreenHeight, 381 / yourScreenWidth, 209 / yourScreenHeight --dxDrawImage( rx * sx, ry * sy, rsx* sx, rsy * sy, ... ) function renderDisplay ( ) dxDrawImage( rx * sx, ry * sy, rsx* sx, rsy * sy, "hud.png" ) end function HandleTheRendering ( ) addEventHandler("onClientRender", root, renderDisplay) -- Keep everything visible with onClientRender. end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
  2. Hi guys, so my problem is that then I dxDrawImage an image it isn't in the same place for two different resolutions. Here is my current code: local x,y = guiGetScreenSize() -- Get screen resolution. function renderDisplay ( ) dxDrawImage ( x/2*1.65, y/2, 381, 209, 'hud.png' ) end function HandleTheRendering ( ) addEventHandler("onClientRender", root, renderDisplay) -- Keep everything visible with onClientRender. end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) I have been trying to place it into the top right corner of the screen. Thanks for reading
×
×
  • Create New...