How to introduce different types of Ammo pickups

Please someone help me with Ammo types …for example i want different types of Ammo Pick ups, for example like if i pick up Green color ammo crate it will add bullets to my AK-47 , and if Red it will add bullets to my other gun , and if Red it will add bullets to my other gun …i’ll be very thankful to u

There are several ways depending how you pick the ammo. One way would be doing a enum

enum AmmoType{
       AkAmmo,
       GunAmmo,
       RocketAmmo
}

reference it to a variable and with a switch giving it to the corresponding variable. Example:

public AmmoType ammoType;
public int ammo;

void PickAmmo(){

         switch(ammoType){

                 case: AmmoType.AkAmmo:

                          playerAkAmmo+=ammo;

                 break;

                 case: AmmoType.GunAmmo:

                          playerGunAmmo+=ammo;

                 break;

                 case: AmmoType.RocketAmmo:

                          playerRocketAmmo+=ammo;

                 break;

        }

}