Is there anyway I can do that for my own game.
cvar_set nokill 1
But like jimmy said, will only work if its your server that you have admin to, or a local game. As for zooming in and out, this script here should work, basically it just changes the fov when you push a button down though.
bind "MOUSE3" "+zoom"
alias -zoom "crosshair 2;fov 120;sensitivity 10"
alias +zoom "crosshair 2;fov 30;sensitivity 3"
I do remember 5 lines of code though, but they're the only 3 that I can fish out of my config. Remember you'll need to adjust the settings to what you want.