camera on getbuttondown

how do i do if imput getbuttondown("fire2") { guncam view=true;

so that when i press my right mouse button the fps main camera switch to guncam

my second camera is named guncam

so can you help me

Switch Cameraat the Unify Wiki has exactly what you need,folow the link. Look harder before asking.