Do you want to change the ammo icon in the bottom right corner?
Take a look at some custom weapons made by Dias, like Thunderbolt, it changes the ammo icon.
ammo icon based on weaponlist file like weapon_thunderbolt.txt in sprites folder. That can't be done via scripts.
But you can create two weaponlist files and one will have first ammo type second will have another then after switching send message of weaponlist.