@RUSH Posted February 3, 2018 Posted February 3, 2018 (edited) Hello friends. am new to creating HUD dx. i want to know how to make this animation health and armor. it is not used dx circle. please give me functions or application in shader Exemplo: Edited February 3, 2018 by @RUSH
@RUSH Posted February 3, 2018 Author Posted February 3, 2018 3 minutes ago, NeXuS™ said: dxDrawCircle, or shader. am new to creating HUD dx. i want to know how to make this animation health and armor. it is not used dx circle. please give me functions or application in shader
NeXuS™ Posted February 3, 2018 Posted February 3, 2018 How do you know if it doesn't use that given function or shader?
@RUSH Posted February 3, 2018 Author Posted February 3, 2018 Just now, NeXuS™ said: Como você sabe se não usa essa função ou sombreador? I've used too much dxDrawCircle and already tried, it is not with him that does this, try and see
NeXuS™ Posted February 3, 2018 Posted February 3, 2018 You can use that function to draw it like that.
#RooTs Posted February 3, 2018 Posted February 3, 2018 6 minutes ago, NeXuS™ said: dxDrawCircle , ou shader . The user edited your post is possible with dx circle ?
NeXuS™ Posted February 3, 2018 Posted February 3, 2018 I think you'll have to edit the dxDrawCircle function, but with the shader, you could do it instantly.
@RUSH Posted February 3, 2018 Author Posted February 3, 2018 5 minutes ago, NeXuS™ said: Eu acho que você terá que editar a função dxDrawCircle , mas com o sombreador , você pode fazê-lo instantaneamente. Help me with shader? i don't have experiencie with this...
#RooTs Posted February 3, 2018 Posted February 3, 2018 8 minutes ago, NeXuS™ said: I think you'll have to edit the dxDrawCircle function, but with the shader, you could do it instantly. I'm very curious to know how to do this with shader. can you give us a simple example?
NeXuS™ Posted February 3, 2018 Posted February 3, 2018 Just download the example given there, and understand the code there.
#RooTs Posted February 3, 2018 Posted February 3, 2018 14 minutes ago, NeXuS™ said: Just download the example given there, and understand the code there. this will not help you. he does not know anything about it. and neither for me. please create an example for the staff to be able to understand. This will help a lot of people here. Thanks
#RooTs Posted February 3, 2018 Posted February 3, 2018 I found it very complicated. sorry, friend 1 minute ago, NeXuS™ said: That's an example. I will take a look
main Posted February 3, 2018 Posted February 3, 2018 9 hours ago, @RUSH said: Hello friends. am new to creating HUD dx. i want to know how to make this animation health and armor. it is not used dx circle. please give me functions or application in shader Exemplo: Use DxDrawImageSection.
main Posted February 3, 2018 Posted February 3, 2018 local sWidth, sHeight = guiGetScreenSize() local hud = {} hud.bgHpX = sWidth - 200 hud.bgHpY = 20 hud.bgHpW = 50 -- pixels img hud.bgHpH = 50 -- pixels img hud.HpX = sWidth - 195.5 hud.HpY = 65 hud.HpW = 42 -- pixels img hud.HpH = 42 -- pixels img function onClientRender() dxDrawImage(hud.bgHpX, hud.bgHpY, hud.bgHpW, hud.bgHpH, "design/hp_bg.png") -- background hp local hp = getElementHealth(getLocalPlayer()) local hpHeigth = hud.HpH / 100 * (hp) dxDrawImageSection(hud.HpX, hud.HpY, hud.HpW, -hpHeigth, 0, 0, hud.HpW, -hpHeigth, "design/hp_full.png", 0, 0, 0, 0x50FF0000, false) end addEventHandler("onClientRender", root, onClientRender) Here is an example.
NeXuS™ Posted February 3, 2018 Posted February 3, 2018 @MainSCR can you give us a screenshot of how that looks like? I doubt it'll recreate the shown one by the poster.
main Posted February 3, 2018 Posted February 3, 2018 (edited) HUD from my old server Edited February 3, 2018 by MainSCR
#RooTs Posted February 3, 2018 Posted February 3, 2018 2 hours ago, MainSCR said: local sWidth, sHeight = guiGetScreenSize() local hud = {} hud.bgHpX = sWidth - 200 hud.bgHpY = 20 hud.bgHpW = 50 -- pixels img hud.bgHpH = 50 -- pixels img hud.HpX = sWidth - 195.5 hud.HpY = 65 hud.HpW = 42 -- pixels img hud.HpH = 42 -- pixels img function onClientRender() dxDrawImage(hud.bgHpX, hud.bgHpY, hud.bgHpW, hud.bgHpH, "design/hp_bg.png") -- background hp local hp = getElementHealth(getLocalPlayer()) local hpHeigth = hud.HpH / 100 * (hp) dxDrawImageSection(hud.HpX, hud.HpY, hud.HpW, -hpHeigth, 0, 0, hud.HpW, -hpHeigth, "design/hp_full.png", 0, 0, 0, 0x50FF0000, false) end addEventHandler("onClientRender", root, onClientRender) Here is an example. Not is imageselection my friend.
Captain Cody Posted February 3, 2018 Posted February 3, 2018 A shader would perform a thousand times better then using dxDraw.
main Posted February 3, 2018 Posted February 3, 2018 2 minutes ago, CodyJ(L) said: A shader would perform a thousand times better then using dxDraw. Of course, but can also do with dxDraw.
Captain Cody Posted February 3, 2018 Posted February 3, 2018 dxDraw will destory your frame rate I know this from previous testing
NeXuS™ Posted February 3, 2018 Posted February 3, 2018 1 hour ago, MainSCR said: HUD from my old server That isnt what he is trying to achieve. He is trying to do it that the angle drawn means the health.
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