Please I am making a game multiplayer, and do I want that it shows the names in the heads of the entities, but just in the servER of the for seeing the names, in the way customer I don't get to see, what should make? see the image;

the CLIENT doesn't get to see the names



//////////////////////////////////////////////////////////
//////CODE OF THE NAME IN THE ENTITY//////////////////////
//////////////////////////////////////////////////////////

font system_font = <system.pcx>, 10, 12;

/////////////////////////////////////////////////////////////////////////

text name1_txt
{
font = system_font;
string = player_name;
}

text name2_txt
{
font = system_font;
string = player_name;
}

/////////////////////////////////////////////////////////////////////////

function name_ent1()
{
while (1)
{
vec_set (temp, my.x);
temp.z += 40; // play with this value for every entity
trace_mode = ignore_me + ignore_models + ignore_passents;
if (trace (my.x, camera.x) == 0) // if the entity is visible on the screen
{
vec_to_screen (temp, camera);
name1_txt.pos_x = temp.x; // set the position of the text
name1_txt.pos_y = temp.y; // on x and y
name1_txt.visible = on; // and make it visible
}
else // the entity isn't visible on the screen?
{
name1_txt.visible = off; // hide the text
}
wait (1);
}
}

function name_ent2()
{
while (1)
{
vec_set (temp, my.x);
temp.z += 60; // play with this value for every entity
trace_mode = ignore_me + ignore_models + ignore_passents;
if (trace (my.x, camera.x) == 0) // if the entity is visible on the screen
{
vec_to_screen (temp, camera);
name2_txt.pos_x = temp.x; // set the position of the text
name2_txt.pos_y = temp.y; // on x and y
name2_txt.visible = on; // and make it visible
}
else // the entity isn't visible on the screen?
{
name2_txt.visible = off; // hide the text
}
wait (1);
}
}



see the code of the player;

function player_client()
{
my.skin = num_client;//O skin aqui é apenas para usar o contador cliente
if (my.skin ==1){player1 = my;
name_ent1();while (player1 == null){wait(1);}}//Aqui que eu verifico quem é o player 1 ou 2
if (my.skin ==2){ player2 = my;
name_ent2();while (player2 == null){wait(1);}}
num_client += 1;
if (num_client > 3){wait(1);remove (me);return;}
MY.ENABLE_DISCONNECT = ON;
MY.EVENT = _actor_connect;//Esta função é préfabricada e se encontra no arquivo actor.wdl
my.health = 100;
my.ammo = 9999;
player_walk();
//player_drive();
send_variable();
if (MY.shadow == OFF) { drop_shadow(); }
}


how do for what do all I see the names of the entities in the head of the payers? at once I thank.

Last edited by Pr0gr4mm3r; 10/13/06 20:18.

my site of 3d gamestudio: http://byteseartes.sitesled.com