Or set the vslider in the pan_create line:
panel_for_3d=pan_create("vslider = 16, 71, 90, "slider.pcx", 20, 100, slider_var;bmap=main2.pcx;",4);