i tried using the codbase code but i couldent use it that well so i wrote my own it works fine apart from when you shoot the first bullet the ammo keeps going down until you shoot the second one heres my code anyone know why
rem long shooting code
if bulletlife=0
if gun=2
if shoot=1
if mouseclick()=1 and bulletlife=0
if ammo#>0 then ammo#=ammo#-1
if shootwait<0
if gun=2 then shootwait=5+rnd(0)
if gun=2 then rot#=rot#+7+rnd(3)
if mouseclick()=1 and gun=2 then play sound 7
position object 4,camera position x(),camera position y(),camera position z()
set object to camera orientation 4
bulletlife=50
show object 4
endif
endif
endif
endif
endif
if bulletlife > 0
dec bulletlife
move object 4,150
endif
if bulletlife < 50
if gun=2
if shoot=1
if mouseclick()=1 and bulletlife#=0
if ammo#>0
ammo#=ammo#-1
if shootwait<0
if gun=2 then shootwait=5+rnd(0)
if gun=2 then rot#=rot#+7+rnd(3)
if mouseclick()=1 and gun=2 then play sound 7
position object 5,camera position x(),camera position y(),camera position z()
set object to camera orientation 5
bulletlife#=50
show object 5
endif
endif
endif
endif
endif
endif
if bulletlife# > 0
dec bulletlife#
move object 5,150
endif
i used to be indecisive but now ime not so sure