I’m making a SWEP that the less ammo it has , the less accurate it is. But the problem is that I don’t know what to use. I know dmg is for the damage but I’m lost at the accuracy. Any help?
Post your code.
[lua]function SWEP:ShootBullets(dmg, numbul, cone)
if self:Clip1() == 1 then
dmg = dmg * 3
dmg = dmg + dmg * (1 - self:Clip1() / self.Primary.ClipSize)
self.BaseClass.ShootBullets(self, dmg, numbul, cone)
This is what I’m working off.
cone is the accuracy.
Okay , but still , how do I make it less when there are less bullets left in the mag?
Same way you did it with damage.
so its just “cone” instead of “dmg” or something else? That’s what I’m asking.
[editline]30th November 2013[/editline]
That seems to work. Thanks.