I think that you´re looking for something like this:
(but this example changes the whole texture)
Code:

VIEW* side_view = // the view
{
layer = -1; // above or below others
pos_x = 0; // position of the view
pos_y = 0; // position of the view
size_x = 512; // size of the view
size_y = 512; // size of the view
flags = (VISIBLE);
}

void TheCamera(ENTITY* ent)
{
my = ent;
side_view.bmap = bmap_for_entity(my,0); //render the view into the entities texture

//do something with the view
}

void main()
{
level_load("");
wait(1);
you = ent_create ("myObject.mdl", vector(-150, 0, 27), NULL); // create the object in our world
TheCamera(you); // start the camera and follow myObject
}