Undocumented function! (Thanks XP-Cagey and Killgore)
This function will return 1 if the current cell is an interior cell and 0 if it is an exterior cell. It will also return 1 if the player is in an interior acting like exterior (GetWindSpeed can be used to detect a fake exterior).
The following is a global sample script by Killgore. If you want to try it out start it by typing "StartScript Outside_Check" in the console.
Begin Outside_Check
short doonce
if (MenuMode == 1)
Return
EndIf
if (doOnce == 0) ;if you’re in some brand new cell