• Finiding max ammo?
    3 replies, posted
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: [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index0868.html#Part_Two"]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index0868.html#Part_Two[/URL] 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 :/
[lua]weapons.Get( 'weapon_class' ).Primary.ClipSize[/lua]
Sorry, you need to Log In to post a reply to this thread.