Set Ammo in SWEP lua?

Hi, I was just wondering if there was a way to set the ammo for a weapon in the SWEP lua?



Look for SWEP.Primary.Ammo or SWEP.Secondary.Ammo, depending on the function.

I’m looking to set the cache size? So when you reload it takes the ammo out of the cache, that’s the thing I want to set

Maybe if you more clearly explain what you want to do we would be able to help. What are you trying to do?

I’m trying to set the ammo for not whats in the clip but whats in the cache if you know what i mean, so where the clip reloads from

If you mean you want to set how much ammo the player has extra, then you can use Player:SetAmmo( number:amount, string:type ).