float SVC_SETVIEWPORT = 5;    // Net.Protocol 0x05
float SVC_SETVIEWANGLES = 10; // Net.Protocol 0x0A
float SVC_UPDATEENTITY = 128; // Net.Protocol 0x80

void(entity me) CameraOn =
{
  local entity cam;
  cam = hologram;  //Now you see why classnames are so important :)
  msg_entity = me;                         // target of message
  WriteByte (MSG_ONE, SVC_SETVIEWPORT);    // 5 = SVC_SETVIEWPORT;  
  WriteEntity (MSG_ONE, cam);           // view port
  WriteByte (MSG_ONE, SVC_SETVIEWANGLES);  // 10 = SVC_SETVIEWANGLES
  WriteAngle(MSG_ONE, cam.angles_x);    // tilt 
  WriteAngle(MSG_ONE, cam.angles_y);    // yaw
  WriteAngle(MSG_ONE, cam.angles_z);    // flip
};


void(entity me) CameraOff =
{
  local entity cam;
  cam = me;
  msg_entity = me;                         // target of message
  WriteByte (MSG_ONE, SVC_SETVIEWPORT);    // 5 = SVC_SETVIEWPORT;  
  WriteEntity (MSG_ONE, cam);           // view port
  WriteByte (MSG_ONE, SVC_SETVIEWANGLES);  // 10 = SVC_SETVIEWANGLES
  WriteAngle(MSG_ONE, cam.angles_x);    // tilt 
  WriteAngle(MSG_ONE, cam.angles_y);    // yaw
  WriteAngle(MSG_ONE, cam.angles_z);    // flip
};
