The following code assumes that the direction of the weapon is the same as the default view's (camera).
Furthermore you need a small bitmap which is used for your laser beam:
Code:
bmap laserAim_map = "myLaserAimBitmap.bmp";

var laserAim_status = 0;

function effect_LaserAim()
{
	my.alpha = 60;
	my.bmap = laserAim_map;
	my.move = on;
	my.bright = on;
	my.beam = on;		// if beam doesn't look good, try my.streak = on; instead
	my.lifespan = 1;
}

function toggle_LaserAim()
{
	laserAim_status = !laserAim_status;
	
	while(laserAim_status)
	{
		// Assumption: laser_pos is a vector which represents the current position
		// of the laser beam start
		
		vec_set(temp,vector(10000,0,0)); // length of your laser beam
		vec_rotate(temp,camera.pan);
		
		effect(effect_LaserAim,1,laser_pos,temp);
		
		wait(1);
	}
}



NOTE: not tested, not sure if it works