Ammo problem

Alright, my swep keeps shooting under 0 and I tried everything but it won’t stop. I’m starting to get mad!



SWEP.Primary.ClipSize          = -1
SWEP.Primary.DefaultClip       = 10




if SERVER then

local maxammo = 10
if self:Clip1() == 0 then return end




self:TakePrimaryAmmo( 1 )


Have no idea what I am doing wrong!

It is a problem with your base i think

are you kidding me?

Might be im not know much about SWEP bases but shouldn´t it be defined in SWEP base instead of SWEP code?


SWEP.Primary.ClipSize          = -1

Yeah, sure it will shoot forever, your clip size is -1.

Can’t be, because my other swep has no base either and works fine

I tried to let it shoot without reloading

Then why you are checking for Clip1() to be empty, instead of actual ammo left? Player:GetAmmoCount

Alright, I solved it! Thank you guys.