easiest way i can think of
Code:
void cam_global(){
}

void cam_player(){
}

void main(){

   //...
  while(1){
    
    switch(cam_to_do){
      case 1:
        cam_global();
      case 2:
        cam_player();
    }
    wait(1);
  }
}

obviously you can use if else here instead of switch if using only 2 camera mechanics