HUD Modification

I want to make a property that is unique to a particular SWEP.
It should be like:

When you hold the SWEP, the second number in your ammo counter (which is normally the amount of rounds for that weapon you have in reserve) changes to become the number of full magazines you have.

By the number of full magazines, I don’t mean anything complicated, I simply mean your reserve ammo divided by your primary magazine size.

When holding the hl2 pistol with an 18rd magazine (or “Clip1” as the game refers to it), your ammo counter says " 18 36 " if you have 36 more pistol rounds. For my swep, I instead want the hud to say " 18 2 " if you have 36 more pistol rounds. And in case you’re wondering, the number will be rounded down to the nearest integer. When you’re on your last mag, the mag count will read 0.

I don’t want to create a hud, I simply want to use some weapon-specific code to override the second number in your ammo counter.

Any ideas? Is this possible?