Finiding max ammo?

How would i get the max ammo for the weapon your currently holding for a hud?

I don’t think there is a function to get it from the weapon or anything. All I could find on max ammo was this page from the old wiki: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index0868.html#Part_Two

Looking at this you could get the value from the convars for the max ammo.

e.g.
[lua]local maxPistolAmmo = GetConVarNumber(“sk_max_pistol”)[/lua]

Nah that doesnt work :confused:

[lua]weapons.Get( ‘weapon_class’ ).Primary.ClipSize[/lua]