I guess you could use something like this:
sync on : sync rate 40 : hide mouse
make matrix 1,1000,1000,50,50 : position matrix 1,0,0,0 : set matrix 1,1,1,0,1,1,1,1
make matrix 2,1000,1000,50,50 : position matrix 2,0,50,0 : set matrix 2,1,1,0,1,1,1,1
position camera 500,25,500
do
x#=mousemovex()
y#=mousemovey()
test#=camera angle x()+y#
if test#>45 and test#<145 then test#=45
if test#<315 and test#>145 then test#=315
set cursor 0,0
print "Current angle = "+str$(camera angle x())
rotate camera wrapvalue(test#),wrapvalue(camera angle y()+x#),camera angle z()
sync
loop
angle 45 is the lowest angle you want to be able to use
angle 315 is the largest angle you want to be able to use
145 is half way between, and used as a trade-off to determine from which direction the character was previousely looking