yeah this is possible since the resolution would maximize if we set the game as windowed
Type /setconfig game_windowed 1 if you want to enable this or /setconfig game_windowed 0 if you want to turn it off. Actually you can change this in the game settings(not sure thought)
these commands seem to be familliar with goldsource and source games such as CS:GO and HL2 and if I'm not wrong. Many games allow you to change its commands using the console and they differ on each game. If you want to know the commands of every game just open the console and type help. It's like the cmd after all.
I wrote all of this so just to let you know, this is actually great and I encourage you to seek more for this cool stuff. You've got potential.