Useful for anyone modding weapons or anything related to them.
This should also work for weapons with custom attributes and custom spawned weapons.
Anyway, TF2 doesn't seem to have a netprop or datamap for a weapon's max clip/ammo, meaning you have to use an SDKCall to GetMaxAmmo / GetMaxClip1 to get it. Maybe there's hidden ones really, but yeah.
It also properly accounts for mult_clip_size. I believe it returns -1 for energy weapons though. m_iClip1 will be -1 for energy weapons anyway. (Such as the Cow Mangler).
I also threw in GetDefaultClip (whatever that is) and GetSlot.
And well... see the attached files!
Oh, I only set it up for Linux/Mac, because I'm lazy.