ThatGuyInADressHey guys, I'm working on my own HUD while following raysfire's tutorial, and I decided to make a line that separates the ammoInClip from AmmoInReserve. It looks quite nice, but it's all messed up if using NoClip ammo, because said separating line is not aligned with the numbers. Is it possible to make it disappear when using NoClip ammo? Also it would be cool if I could use a team colored ammo separator that changes into a thin line under NoClip ammo when using such. Thanks in advance.
If your AmmoNoClip looks the same as and is in the same spot as your AmmoInClip, then you can. Make a new label (called "AmmoAlways" or something) that looks like your AmmoInClip / AmmoNoClip. Then make your AmmoInClip's labeltext be "_______" or something, so that it becomes that line that separates them, and make the AmmoNoClip not visible.
This only works because if your AmmoInClip and AmmoNoClip look the same, you don't need to worry about them automatically becoming visible or not depending on what weapon you're using. So you can just use a new label that will always appear to replace both, and that means you can now use the AmmoInClip and AmmoNoClip labels for anything else you want to only appear with weapons with reserve ammo or no clips (in this case, the divider line for weapons with reserve ammo, and nothing extra for ones without).
Because this is label shenanigans, doing anything team colored wouldn't work. You could have a teamcolored imagepanel and then cover it up with a label, but it's not quite the same as the line getting smaller.
vanitasStill this: Also I would like to get rid of the "-" and just see the number itself. How would I do that?
You can make another copy of the font you want to use, and edit it so that the - glyph is blank and has no width or kerning (note, if you just delete the glyph, tf2 will load defaults from whatever fallback font your system uses, which is not what you want).
https://fontforge.github.io/en-US/ or https://birdfont.org/ are two good free font editing software options. Should be a matter of opening the font, editing the glyph, renaming the font inside the editor (needs to be unique and different from the previous font, otherwise clientscheme can't tell them apart), and exporting as otf or ttf (whichever the font originally was is the safer bet). Then it's no different from adding another font to clientscheme.
If you want to make the font size smaller you can delete every glyph other than -+0123456789, since those are the only ones that'll appear in damage numbers and it doesn't matter if everything else gets defaulted to arial or whatever, but this is optional.