I was trying to make a custom HUD for my gamemode and I have two questions about how to make some things work.
First, I want to get rid of the default weapon selection. I've already disabled the other parts of the default HUD, but I've been unable to find a way to remove this portion of it. How might I go about removing this?
Second, how would I make health status shown through an effect on the screen? Something such as a red color shown on the screen's border when the player is injured or some similar display.
1. GMOD Wiki says the HUD element is "CHudWeaponSelection". So something like
[CODE]function HideWeaponSelect ( name )
if name == "CHudWeaponSelection" then
return false
end
end
hook.Add( "HUDShouldDraw", "DontDrawWeaponSelect", HideWeaponSelect )[/CODE]
2. You'd have to whip up something that hooked the regular HUD Health + Armor elements, remove 'em, then hook something like "CTakeDamageInfo.GetDamage" or some such thing (look up the "CTakeDamageInfo" hooks on GModWiki) and have it draw some effects on the screen (check [URL="http://wiki.garrysmod.com/?title=Render"]GMODWiki's Render Library[/URL]), I guess.
Sorry, you need to Log In to post a reply to this thread.