VenomOG Posted September 10, 2018 Share Posted September 10, 2018 (edited) dxDrawLine(790, 73 - 1, 671 - 1, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(671 - 1, 90, 790, 90, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(790, 90, 790, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(671 - 1, 73 - 1, 671 - 1, 90, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(790, 73 - 1, 671 - 1, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(671 - 1, 90, 790, 90, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(790, 90, 790, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(671, 73, 119, 17, tocolor(123, 112, 120, 160), false) dxDrawRectangle(671, 73,(getElementData(getLocalPlayer(), "kill.level") or 0)*(119/100), 17, tocolor(0, 0, 0, 160), false) dxDrawText("Level : "..(getElementData(getLocalPlayer(),"Level")), 635, 94, 676, 114, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText((getElementData(getLocalPlayer(),"kill.level")).." / 100", 698, 73, 804, 89, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("XP : ", 635, 74, 676, 94, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) Can someone please. make this code for all resolution, im good dx but not that good,thanks Edited September 10, 2018 by KnucklesSAEG Link to comment
MIKI785 Posted September 10, 2018 Share Posted September 10, 2018 Take a look at guiGetScreenSize, it's described there. Link to comment
VenomOG Posted September 10, 2018 Author Share Posted September 10, 2018 2 minutes ago, MIKI785 said: Take a look at guiGetScreenSize, it's described there. I Just Cannot i tried , Please just help me. Link to comment
MIKI785 Posted September 10, 2018 Share Posted September 10, 2018 1 minute ago, KnucklesSAEG said: I Just Cannot i tried , Please just help me. You didn't try, your code doesn't contain any position calculations. Link to comment
VenomOG Posted September 10, 2018 Author Share Posted September 10, 2018 OK ill try local sWidth,sHeight = guiGetScreenSize() -- The variables addEventHandler("onClientRender", root, function() local r, g, b = getPlayerNametagColor (localPlayer) local name = getPlayerName(getLocalPlayer()) if (getElementData(localPlayer,"loggedin") == true) then dxDrawLine(671 - 1, 73 - 1, 671 - 1, 90, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(790, 73 - 1, 671 - 1, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(671 - 1, 90, 790, 90, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(790, 90, 790, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(671 - 1, 73 - 1, 671 - 1, 90, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(790, 73 - 1, 671 - 1, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(671 - 1, 90, 790, 90, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(790, 90, 790, 73 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(sWidth*1.310, sHeight*0.142, sWidth*0.309, sHeight*0.044, tocolor(123, 112, 120, 160), false) dxDrawRectangle(sWidth*1.310, sHeight*0.142,(getElementData(getLocalPlayer(), "kill.level") or 0)*(119/100), sHeight*0.044, tocolor(0, 0, 0, 160), false) dxDrawText("Level : "..(getElementData(getLocalPlayer(),"Level")), 635, 94, 676, 114, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText((getElementData(getLocalPlayer(),"kill.level")).." / 100", 698, 73, 804, 89, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("XP : ", 635, 74, 676, 94, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) end end ) @MIKI785 Link to comment
Dimos7 Posted September 10, 2018 Share Posted September 10, 2018 local sWidth,sHeight = guiGetScreenSize() -- The variables addEventHandler("onClientRender", root, function() local r, g, b = getPlayerNametagColor (localPlayer) local name = getPlayerName(getLocalPlayer()) if (getElementData(localPlayer,"loggedin") == true) then dxDrawLine(sWidth*671 - 1, sHeight*73 - 1, sWidth*671 - 1, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*73 - 1, sWidth*671 - 1, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*671 - 1, sHeight*90, sWidth*790, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*90, sWidth*790, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*671 - 1, sHeight*73 - 1, sWidth*671 - 1, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*73 - 1, sWidth*671 - 1, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*671 - 1, sHeight*90, sWidth*790, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*90, sWidth*790, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawRectangle(sWidth*1.310, sHeight*0.142, sWidth*0.309, sHeight*0.044, tocolor(123, 112, 120, 160), false) dxDrawRectangle(sWidth*1.310, sHeight*0.142,(getElementData(getLocalPlayer(), "kill.level") or 0)*(119/100), sHeight*0.044, tocolor(0, 0, 0, 160), false) dxDrawText("Level : "..(getElementData(getLocalPlayer(),"Level")), sWidth*635, sHeight*94, sWidth*676, sHeight*114, tocolor(255, 255, 255, 255), sWidth*0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText((getElementData(getLocalPlayer(),"kill.level")).." / 100",sWidth* 698, sHeight*73, sWidth*804, sHeight*89, tocolor(255, 255, 255, 255), sWidth*0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("XP : ", sWidth*635, sHeight*74, sWidth*676, sHeight*94, tocolor(255, 255, 255, 255),sWidth*0.50, "bankgothic", "left", "top", false, false, false, false, false) end end ) Link to comment
itHyperoX Posted September 10, 2018 Share Posted September 10, 2018 using elementDatas in render = getting the same data every second 60 times Link to comment
Gordon_G Posted September 11, 2018 Share Posted September 11, 2018 @TheMOG is right, you should store the elementData in a client side variable that you actualize when elementData change Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now