Unity 3d Using number's as key presses

I need help trying to input number’s into the coding here is what I’m trying to do:

If you press the number one it will choose a weapon. If you press the number one again it will choose another weapon. The cycle continues as you keep pressing the number one. If you guys could show me what code could make this happen that would be awesome.

void Update()
   {
       if (Input.GetKeyDown(KeyCode.Alpha1))
       {
           CurrentPlayer.SelectNextWeapon(); 
       }
   }

Where

CurrentPlayer.SelectNextWeapon();

is a custom function that selects next weapon. Obviously I can’t write the code in that function since I don’t know how your game stores and handles weapons and loadouts.

Well this is what I have so far

#pragma strict
var projectile : GameObject;

function Start ()
{

}

function Update ()
{

if(Input.GetButtonUp(“Fire1”))
{
print(“axe”);
}
if(Input.GetButtonUp(“Fire1”))

{
print(“doubleaxe”);
}

}

So you want to change the weapon with the use of only one (“Fire1”) button or for different keys for different weapons?

only one (“Fire1”) yes. Pressing 1 will select one weapon, double pressing 1 will select another weapon

private string[] weaponNames = new string[2] { "axe", "doubleaxe" };
private int currentWeapon = 0;

void Update()
{
    if (Input.GetKey(KeyCode.Alpha1))
        ChangeWeapons();
}

private void ChangeWeapons()
{
    if (currentWeapon < weaponNames.Length)
        currentWeapon++;
    else
        currentWeapon = 0;

    Debug.Log(weaponNames[currentWeapon]);
}