First find the target position of where you click with the mouse, for this use c_trace from mouse_pos3d in direction of mouse_dir3d.
Then get the vector from the player to the target position, and rotate the players pan angle toward that position, and let the player walk until the distance to the target position is below a minimum.
Thats the general idea.