Currently it is not possible to get/read the opticsMode with a scripting command or set the opticsMode with a scripting command.
opticsMode can only be changed by pressing a key to change it (opticsMode => "Left Ctrl+Sec. Mouse Btn." or "/ [NUM]")
It would be really nice to have this for respawn for example. So if a player respawns a respawn script could read out opticsMode in a killed eventhandler and set it again on respawn.
Please implement scripting commands for reading and setting opticsMode.