You can try adding the ignore_you in the mode , and after on the next line you can put
you=player; , before the move , heres an example of how I have done for a similar thing ,

vec_scale(temp,movement_scale); // scale distance by movement_scale
move_mode = ignore_you + ignore_push + ignore_passable + ignore_maps;
you=player;
result = ent_move(nullskill,temp);

Hope it helps.