Look, this is the code I`m using for attaching a gun to my model.

STRING Gatlin_mdl = "Gatlin.mdl";
function Gatlin()

{
proc_mode = PROC_LATE;
set(my,PASSABLE); // the Gatlin shouldn't slow down the player
while (player == NULL){wait (1);}//wait ´till the player is created.
while(1)
{
vec_for_vertex (my.skill1, you, 1446);
vec_for_vertex (my.skill4, you, 1447); //vertex on the model hand


vec_diff (my.skill7, my.skill4, my.skill1);// compute the vector that will be used by the Gatlin
vec_to_angle (my.pan, my.skill7); // rotate the Gatlin accordingly

// put the origin of the Gatlin in the vertex that is placed at the bottom of the arm
vec_set (my.x, my.skill1);
wait (1);
}
}


AND you need to add a line on the character code, to ent_create the model to attach and call the function.
BUT, this is going to attach the models nicely, but it can cause some issues depending on your player`s code.

Last edited by Renard; 09/08/09 21:36.

WRYYYYYYYYYYYYYYYYYY!!!1!!ONE!!11