Szerző Téma: dxDrawImage szabályozása  (Megtekintve 3222 alkalommal)

dxDrawImage szabályozása
« Válasz #15 Dátum: 2017. Február 11. - 18:06:11 »
0
Próbáld így
 

local playerHP = math.floor(getElementHealth(localPlayer))
local playerArmour = math.floor(getPedArmor(localPlayer))
local playerMoney = getPlayerMoney()
local playerPing = getPlayerPing(getLocalPlayer())
dxDrawImage(x/2 + 340, 58, x/(1366/45), y/(768/45), \"rgm.png\")
dxDrawRectangle(x/1.35, y/45, x/4, y/30, tocolor(0, 0, 0, 150))
dxDrawRectangle(x/1.35, y/4.60, x/6, y/30, tocolor(0, 0, 0, 150))
dxDrawRectangle(x/1.35, y/15, x/4, y/7, tocolor(0, 0, 0, 150))
dxDrawRectangle(x/1.23, y/13, x/6, y/33, tocolor(0, 0, 0, 150))
dxDrawRectangle(x/1.23, y/13, playerHP*2.28, y/33, tocolor(38, 166, 91, 150))
dxDrawRectangle(x/1.23, y/8.50, x/6, y/33, tocolor(0, 0, 0, 150))
dxDrawRectangle(x/1.23, y/8.50, playerArmour*2.28, y/33, tocolor(255, 255, 255, 255))
dxDrawImage(x/2 + 340, 14, x/(1366/110), y/(768/30), \"logo.png\")
dxDrawImage(x/2 + 350, 170, x/(1366/16), y/(768/16), \"coin.png\")
dxDrawImage(x/2 + 400, 58, x/(1366/25), y/(768/25), \"heal.png\")
dxDrawImage(x/2 + 400, 88, x/(1366/25), y/(768/25), \"armor.png\")
dxDrawText(playerHP .. \"%\", x/1.13, y/12.5, x, y, tocolor(255, 255, 255, 255), 1, \"default-bold\")
dxDrawText(playerArmour .. \"%\", x/1.13, y/8.25, x, y, tocolor(255, 255, 255, 255), 1, \"default-bold\")
dxDrawText(playerName, x/1.14, y/37, x, y, tocolor(255, 255, 255, 255), 1.3, \"default-bold\")
dxDrawText(playerMoney .. \" $\", x/1.29, y/4.60, x, y, tocolor(255, 255, 255, 255), 1, \"diploma\")
dxDrawText(\"ping:\" .. playerPing, x/1.06, y/4.80, x, y, tocolor(38, 166, 91, 150), 2, \"sand\")
local playerVehicle = getPedOccupiedVehicle(localPlayer)
if playerVehicle then
local vehicleHealth = getElementHealth(playerVehicle)/ 10  -- Divide this by 10, as default the denominator is 1000
dxDrawRectangle(x/1.41, y/45, x/45, y/5.30, tocolor(0, 0, 0, 150))
dxDrawRectangle(x/1.41, y/45, x/45, vehicleHealth*1.45, tocolor(162, 162, 162, 162))
end

 
 

dxDrawImage szabályozása
« Válasz #16 Dátum: 2017. Február 11. - 18:17:48 »
0
Köszi, így működött. De rájöttem, hogy felesleges ez a Rectangle, photoshop-olok egy normálisat inkább, de az is dximage-val fogom, szóval köszi :) 

dxDrawImage szabályozása
« Válasz #17 Dátum: 2017. Február 11. - 19:02:38 »
0
Még 1 kérdés. Van ugye ilyen sorom
dxDrawRectangle ( x/3.8, y/3.8, playerHP*3.02, y/25, tocolor ( 255, 0, 0, 150 ) )

 a playerHP sort is szeretném ugye guiGetScreenSize-olni ( vayis x-et írni hozzá, hogy ne menjen ki senki képernyőéből. Hogyan?

dxDrawImage szabályozása
« Válasz #18 Dátum: 2017. Február 11. - 19:09:45 »
0

dxDrawRectangle(x/3.8, y/3.8, x/(1366/(playerHP*3.02)), y/25, tocolor(255, 0, 0, 150))

 
?

dxDrawImage szabályozása
« Válasz #19 Dátum: 2017. Február 11. - 22:36:14 »
0
Működött, köszi mindent :) . Több kérdésem már nem lesz 
 
 

dxDrawImage szabályozása
« Válasz #20 Dátum: 2017. Február 12. - 10:10:43 »
0
A kép mérete jó, de most meg az x tengelyen csúszik el kis felbontáson, csak a fele látszódik a képnek :D .

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal