Ok I tried and it lockup the engine. With ent_create you can pass a function with the entity, but not with view entities? The function below is just to test if it's working or not.

Code:
ENTITY* avatar_onscreen =
{
type = "default.mdl";
layer = 20;
flags2 = VISIBLE; // visible on screen from the start
flags = VISIBLE; client_id = camera; // same camera parameters as the default view
x = 100; // place 100 quants ahead of the view
y = -45; // 50 to the right
z = 0; // and center vertically
}

function xyz()
{
if(value==88)
{
// number 88 = blueteam
ent_morph(avatar_onscreen,"blueteam.mdl");

while(1)
{
avatar_onscreen.pan += 5*time_step;
}
wait(1);
}
}




smile