I've made burst fire function, but it don't work how I want.

Thanks for advice and code.