Jump to content

:P


Arsilex

Recommended Posts

Por si alguien quiere eh creado esto:

--CLIEN-SIDE

function getResolucion(xC,yC,widthC,heightC) 
local wC,hC = guiGetScreenSize() 
local xR = 1366 
local yR = 768 
    if xC and yC and widthC and heightC then 
        x = (xC/xR )*wC 
        y = (yC/yR )*hC 
        w = (widthC/xR )*wC 
        h = (heightC/yR )*hC 
        return x,y,w,h 
    else 
        outputChatBox("** #FF0000Error! **",255,0,0,true) 
        return xC,yC,widthC,heightC 
    end 
end 

Recordar cambiar 1366 y 768 por su resolucion

dxDrawImage ( getResolution(24,124,73,235), 'arrow.png', angle, 0, -120 ) 

o exportando asi (solo si el codigo esta en otro script )

dxDrawImage ( exports:resource.getResolution(24,124,73,235), 'arrow.png', angle, 0, -120 ) 

Esto hace que lo que use la funcion devolvera las coordenadas para todas las resoluciones e.e

Link to comment

Se ve bien yo lo que hago para no complicarme es

sWidth,sHeight = guiGetScreenSize() --1024x768 es la resolucion que uso 
   local x = sWidth /1024 
   local y = sHeight /768  

y de ahi solo agrego los x* y y* xD

    dxDrawText("Holi:", x*25, y*260, x*261, y*560, tocolor(0, 255, 251, 255), 1.2, pricedown, "left", "center", false) 

y me evito de estar multiplicando tanto jeje

Link to comment
  • Recently Browsing   0 members

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