Custom Ammo Types Breaking the HUD

I’m running into an issue with custom ammo types. If I use a custom ammo type, the default HUD ammo counter will not display unless the game is out of focus or there’s a menu open; if the menu does display in these cases, it flickers rapidly.

If I use a custom HUD, the stored ammo always returns 0.

I’ve been trying to fix this issue for 3 weeks and I can’t solve it.

There are script errors.
Post them. And post the code from the weapon / ammo.


I found the issue. For future reference, if you call game.AddAmmoType only in an if SERVER block, that’s what causes this issue. Calling it SHARED will make it fix the HUD.