• Ammo problem
    9 replies, posted
Alright, my swep keeps shooting under 0 and I tried everything but it won't stop. I'm starting to get mad! [CODE] SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = 10 [/CODE] [CODE] if SERVER then local maxammo = 10 if self:Clip1() == 0 then return end [/CODE] [CODE] self:TakePrimaryAmmo( 1 ) [/CODE] Have no idea what I am doing wrong!
It is a problem with your base i think
[QUOTE=Snorlaxs;42563952]It is a problem with your base i think[/QUOTE] 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?
[code]SWEP.Primary.ClipSize = -1[/code] Yeah, sure it will shoot forever, your clip size is -1.
[QUOTE=Snorlaxs;42563952]It is a problem with your base i think[/QUOTE] Can't be, because my other swep has no base either and works fine
[QUOTE=Noah;42564190]Can't be, because my other swep has no base either and works fine[/QUOTE] [QUOTE=Snorlaxs;42564048]Might be im not know much about SWEP bases but shouldn´t it be defined in SWEP base instead of SWEP code?[/QUOTE]
[QUOTE=Robotboy655;42564052][code]SWEP.Primary.ClipSize = -1[/code] Yeah, sure it will shoot forever, your clip size is -1.[/QUOTE] 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.
Sorry, you need to Log In to post a reply to this thread.