GModZ's HUD

Posts 1–13 of 13 · Page 1 of 1
GModZ's HUD
I know people have been taking files from GMODZ to bypass/look for exploits. But, is it possible to get there HUD Code? I am trying to see how there Health bar works. I know it works using surface.DrawTexturedRectUV but I can't get it to work. Can anyone get me the code? Thanks!
Quote Originally Posted by canttouchthis123 View Post
I know people have been taking files from GMODZ to bypass/look for exploits. But, is it possible to get there HUD Code? I am trying to see how there Health bar works. I know it works using surface.DrawTexturedRectUV but I can't get it to work. Can anyone get me the code? Thanks!
Already have it.
Plus it's uber shit.
Quote Originally Posted by kila58 View Post
Already have it.
Plus it's uber shit.
Can you just show me how they do the health bar drain? I would really like to know, but I don't want all of the HUD, just the health bar. If you could help me out that would be sweet!
Unsure, try and download GMODZ or whatever, skim their code.
Oh, I'm talking about TPS gaming's GMODZ. Not the one that's on the workshop.
Do you want it to go down a little bit at a time after they get damaged? Or?

*100th post*
It's this one: http://i.imgur.com/ia7YtXU.jpg

So, yeah it drains as your health bar goes down.

Bump. Kila58 you said you had it. Do you think you could help me out?
healthbar.jpg18 KB · 5 downloads
Quote Originally Posted by canttouchthis123 View Post
It's this one: http://i.imgur.com/ia7YtXU.jpgⓘ

So, yeah it drains as your health bar goes down.

Bump. Kila58 you said you had it. Do you think you could help me out?


Yes I am currently looking for it on my cluttered PC.
Quote Originally Posted by kila58 View Post
Yes I am currently looking for it on my cluttered PC.
Sweet, thanks man. You're the best!
Code:
-- Draw the healthbar
local hp_bg = Material( "icons/bg_hp_sil.png" )
local hp_in = Material( "icons/in_hp_sil.png" )

function DrawHPImage( ply )
	if !ply:Health() then return end
	
	local w = 94
	local h = 242
	local padding = 36
	local percent = ply:Health() / 100
	local y = ScrH() - (padding * 3) - (infoBarH * 3)
	local color = Color( 140, 50, 50, 255 )
	
	// Background image.
	render.SetMaterial( hp_bg )
	render.DrawQuadEasy( Vector( padding + w/2, ScrH() - h/2,0),    --position of the rect
        Vector(0,0,-1),        --direction to face in
        w, h,              --size of the rect
        Color( 10, 10, 10, 200 ),  --color
        -90                     --rotate 90 degrees
    )
	
	// Second background image
	render.SetMaterial( hp_in )
	render.DrawQuadEasy( Vector( padding + w/2, ScrH() - h/2,0),    --position of the rect
        Vector(0,0,-1),        --direction to face in
        w, h,              --size of the rect
        Color( 40, 10, 10, 240 ),  --color
        -90                     --rotate 90 degrees
    )

	// Draw the actual HP
	render.SetScissorRect( 0, ScrH() - (h * percent), padding + w, ScrH(), true )
	render.SetMaterial( hp_in )
	render.DrawQuadEasy( Vector( padding + w/2, ScrH() - h/2,0),    --position of the rect
        Vector(0,0,-1),        --direction to face in
        w, h,              --size of the rect
        color,  --color
        -90                     --rotate 90 degrees
    )
	render.SetScissorRect( 0, ScrH() - h + 20, padding + w, ScrH(), false )

	// Draw HP number.
	if ply:Health() > 0 then
		draw.SimpleTextOutlined( ply:Health(), "ChatFont", padding + w/2 - 4, ScrH() - h/2 - 26, Color( 255, 255, 255, 255 ), 1, 1, 1, Color( 0, 0, 0, 255 ))
	end
	
end
Quote Originally Posted by Blue Kirby View Post
stuff
Thank you! +rep
that HUD is from WarZ, only ported over to GMOD by taking a few things out of WarZ's original files and yada yada... just letting you know.
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us