_unit=_this select 0
#start
newview= getpos _unit select 2 + 300
?(getpos _unit select 2 > 1000 && getpos _unit select 2 <5000):setviewdistance newview
?(getpos _unit select 2 <1000):setviewdistance 1000
~10
goto "start"
called with : [this] exec "scriptname.sqs"
That will set the viewdisance to height+300 what the player is at, only if he's over 1000 metres (or under 5000, the max view distance), if not, it gets set to 1000.
That SHOULD work, the script is untested, but that's the idea.
- Ben