Is there a way to give ALL ammo types to a player?

So I am creating an addon one of the features would be give all ammo types. With the command ply:GiveAmmo( 200, “Name”, false ). For name how would I put that to get all the ammo types in one, is that even possible or would I have to do add it one by one?

game.BuildAmmoTypes

Player:GiveAmmo

Loop through the ammo table and give them each type.

game.BuildAmmoTypes doesn’t return the default ammo types, so you’ll have to manually add these to your table if you want to give the player the default ones as well.

You guys are silly



FindMetaTable ("Player").Restock = function (self)
      tblWeapons = self:GetWeapons ()
      for id = 1, #tblWeapons do
            wep = tblWeapons[id]
            self:GiveAmmo (wep:GetMaxClip1 () - wep:Clip1 () wep:GetPrimaryAmmoType ())
            self:GiveAmmo (wep:GetMaxClip2 () - wep:Clip2 (), wep:GetSecondaryAmmoType ())
      end
end


That’s only for weapons the player is holding, though, not all ammo types.