Thank you very much Dark_samurai. It works perfectly

Didn´t think it would be that easy. ^^
Now i just have some more questions.
1) Is it possible to send an entity pointer? Lets say in my example i would send the you pointer to the server. Would the server know who entity this is and how would i send it, or should i better send an id of the entity to the server?
2) If i create a entity with enet_ent_create and give it some action. My bullet hole for example. On the client who created the bullet hole, the "normal" vector is correct and can be used. But on the other clients it´s not correct. So i send skills in the action to the other clients which hold the normal values. I´m waiting a few frames and then using the received normal vector. That works. But is there another solution for that?
Sorry for my 2 questions but those are the only things in programming with anet which i couldnt find out by myself.
Here´s the code for example 2:
function einschuss()
{
VECTOR normal_save;
vec_set(normal_save, normal); // saving normal cause it´s only 1 frame there
set(my,INVISIBLE);
while(enet_ent_globpointer(my) == ANET_ERROR) {wait(1);}
if(MY_CREATOR == MY_CLIENTID) // this runs on the creator machine
{
my.skill[70] = normal_save.x;
my.skill[71] = normal_save.y;
my.skill[72] = normal_save.z;
enet_send_skills(enet_ent_globpointer(my),70,72,BROADCAST);
vec_to_angle(my.pan, normal_save);
if(my.pan == 0)
{
my.pan = 0.001;
}
vec_add(my.x,normal_save);
...
}
else
{
var lifetime = 5; // Just for the while loop
while(lifetime > 0)
{
var normal_x = my.skill[70];
var normal_y = my.skill[71];
var normal_z = my.skill[72];
vec_set(temp_normal, vector(normal_x,normal_y,normal_z));
vec_to_angle(my.pan, temp_normal);
if(my.pan == 0)
{
my.pan = 0.001;
}
if(lifetime < 4.99) // just set vec_add after a short wait
{
if(vec_add_set != 1)
{
vec_add(my.x,temp_normal);
vec_add_set = 1;
}
}
lifetime -= time_step/16;
wait(1);
}
}
AS you can see i´m sending the normal values via skills and then receiving the skills and using them. But i need to use a while loop, because the skills which are send don´t come early enough. It makes sense. But is there another solution maybe?
Thank you very much
