Open unit0016 opened 5 years ago
I do not know, if it is the best method, but, I add that in the .lua of the weapons (TFA) to personalize the number of ammunition in stock.
--------------------------------------
function SWEP:CalculateMaxAmmo()
local ammo_type = self:GetPrimaryAmmoType() or self.Primary.Ammo
if SERVER then
self.Owner:SetAmmo( self.Primary.MaxAmmo , ammo_type )
self:SetClip1( self.Primary.ClipSize )
end
end
SWEP.Primary.MaxAmmo = 80
--------------------------------------
Suggestion, of course: The ability to define a "max ammo" amount for guns that either don't have one, or have one that's too high. Currently, weapons that don't have one seem to default to 10 bullets when bought off a wall.