Make player unable to shoot when reloading

I am trying to make it so that when you are reloading you can’t shoot. I could set current ammo to 0 before currentAmmo is set to maxAmmo but I want to play a different animation when there is still a bullet left in the chamber. Any help?

var bullet : GameObject;
var weapon : GameObject;
var currentAmmo = 30;
var maxAmmo = 30;
var canFire : boolean = false;
var fireSound : GameObject;
var reloadSound : GameObject;
var tacReloadSound : GameObject;
var reloadTime : float = 1.4;






function Update ()
{    
   if (currentAmmo > 0)
       canFire = true;
   if (currentAmmo <= 0)
       canFire = false;
   if (currentAmmo > maxAmmo)
       currentAmmo = maxAmmo;
      
   if (Input.GetButtonDown("Fire") && canFire == true)
       IsFiring ();
       
          
        
       
   if (Input.GetButtonDown("Reload") && currentAmmo < maxAmmo)
       Reload ();
       canFire = false;
   

}

function IsFiring ()
{
   
   if (currentAmmo > 0 && canFire == true)
       currentAmmo --;
       Instantiate(bullet, bulletSpawn.transform.position, bulletSpawn.transform.rotation);
       weapon.animation.Play("Fire");
       Instantiate(fireSound, bulletSpawn.transform.position, bulletSpawn.transform.rotation); 
                       
   if (currentAmmo == 0)
       {
           canFire = false;
           Reload ();
       }

         
}

function Reload ()
{
  
  if (currentAmmo == 0)
      animation.Play("TacReload");
      Instantiate(reloadSound, bulletSpawn.transform.position, bulletSpawn.transform.rotation);
      canFire = false;
       
  if (currentAmmo > 0)
      animation.Play("Reload");
      Instantiate(tacReloadSound, bulletSpawn.transform.position, bulletSpawn.transform.rotation);
      canFire = false;
      
      
  yield WaitForSeconds(reloadTime);
  canFire = false;
  currentAmmo = maxAmmo;
}

In the if statement you could just add “&& !isReloading” where isReloading is true when reload is called and set back to false when player does shoot.

Fixed it! I set the current ammo within each if statement to equal 0 until the reloadTime had counted down. Then current ammo was set to equal maxAmmo

That’s how I did this:

        public float ammo; //chars ammo
    	public float clip; //chars clips
    	public bool reload = false; //by default we're not reloading

        void Update ()
	{
	//shoot if there is ammo
		if  (ammo > 0) 
		{
			Shoot ();
		}
	//reload if there is no ammo or "R" button is pressed
		if (ammo == 0 | Input.GetKeyDown(KeyCode.R))
		{
			StartCoroutine (Reload ());
		}
    }
        void Shoot () //inable shooting
        	{ 
        		if (Input.GetKey(KeyCode.Mouse0) && Time.time > nextFire && reload == false)
                //shooting code here
            }
        IEnumerator Reload () //reload the weapon
        	{
        		reload = true;
        		yield return new WaitForSeconds(2);
        		if (clip > 0)
        		{
        			ammo = 35;
        			clip--;
        		}
        		reload = false;
        	}

Now when my character’s reloading he can’t shoot.