Sometimes players on the server ask about technical issues in ET; about configs, mouse sens or whatever. I always reply 'write your own' or 'your own settings are the best' since during the gameplay it's kinda hard to explain. But here is a different story, so let's go:
bind x "+leanleft"
bind binds a key to a function, x is a key and +leanleft a function (function in ET is predefined). Don't forget "". + means that the function is executed while the key is pressed, when it's released the function is called off (it's done automatically, but we could call it off manually be writng -leanleft). We always bind one key, but we can call many functions. If we want to bind a key to many functions, it's better to script it...but step by step:
bind x "vstr leanleft"
set leanleft "+leanleft"
here we binded x to a variable string (vstr) leanleft, the script is called using command 'set', and the function is +leanleft. So pretty useless script on its own, just to get the idea across;p.
bind x "vstr leanleft"
set leanleft "+leanleft; cg_fov 111"
now we call two functions. ; is the separator, without it the script won't work. cg_fov is called a cvar (client variable), the list of them is in the console when you press tab after writing cg_ (same goes for cl_, r_, b_ etc.).
bind x "vstr leanleft"
set leanleft "+leanleft; cg_fov 111; sensitivity 1; say_team blabla; cg_drawgun 0; cl_timenudge - 100; cg_bobyaw 1; m_pitch 0.0022; cl_mouseaccel 1; cg_showblood 0"
now we call 10 functions. If we test the script, it might not work, but it's not bugged. It's because scripts can't be too long (all in a line, like spaghetti). We have to break them:
bind x "vstr leanleft"
set leanleft "+leanleft; cg_fov 111; sensitivity 1; say_team blabla; cg_drawgun 0; vstr the_rest"
set the_rest "cl_timenudge - 100; cg_bobyaw 1; m_pitch 0.0022; cl_mouseaccel 1; cg_showblood 0"
so we binded a key to a script that calls another script, and each script calls 5 commands. All this is done since there are no loops like in programming. We can continue in such a fashion to infinity; the script will never fail to work.
Much like + functions, thare are + scripts:
bind x "+vstr 1 2"
set 1 "+leanleft"
set 2 "+leanright"
so if we press x we call a variable string 1, if we release it vstr 2 is called. Unlike drinks however, we cannot mix scripts in a single line:
bind x "+vstr 1 2; vstr abc" <-----won't work. When to execute script abc?. But there is a way around this if we call the script not in the same line:
bind x "+vstr 1 2"
set 1 "+leanleft; vstr abc"
set abc "r_gamma 3.0"
set 2 "+leanright; vstr def"
set def "r_gamma 1.0"
the rest is left to our creativity. The third way to loop a script is:
set gamma1 "r_gamma 1.0"
set gamma2 "r_gamma 1.1"
set gamma3 "r_gamma 1.2"
set gamma4 "r_gamma 1.3"
set gamma5 "r_gamma 1.4"
set gamma6 "r_gamma 1.5"
set gamma7 "r_gamma 1.6"
set gamma8 "r_gamma 1.7"
set gamma9 "r_gamma 1.8"
set gamma10 "r_gamma 1.9"
set gamma11 "r_gamma 2.0"
set gamma12 "r_gamma 2.1"
set gamma13 "r_gamma 2.2"
set gamma14 "r_gamma 2.3"
set gamma15 "r_gamma 2.4"
set gamma16 "r_gamma 2.5"
set gamma17 "r_gamma 2.6"
set gamma18 "r_gamma 2.7"
set gamma19 "r_gamma 2.8"
set gamma20 "r_gamma 2.9"
set gamma21 "r_gamma 3.0"
set g1 "vstr gamma1; echo ^?gamma set to 1.0; set gammaUp vstr g2"
set g2 "vstr gamma2; echo ^?gamma set to 1.1; set gammaUp vstr g3; set gammaDown vstr g1"
set g3 "vstr gamma3; echo ^?gamma set to 1.2; set gammaUp vstr g4; set gammaDown vstr g2"
set g4 "vstr gamma4; echo ^?gamma set to 1.3; set gammaUp vstr g5; set gammaDown vstr g3"
set g5 "vstr gamma5; echo ^?gamma set to 1.4; set gammaUp vstr g6; set gammaDown vstr g4"
set g6 "vstr gamma6; echo ^?gamma set to 1.5; set gammaUp vstr g7; set gammaDown vstr g5"
set g7 "vstr gamma7; echo ^?gamma set to 1.6; set gammaUp vstr g8; set gammaDown vstr g6"
set g8 "vstr gamma8; echo ^?gamma set to 1.7; set gammaUp vstr g9; set gammaDown vstr g7"
set g9 "vstr gamma9; echo ^?gamma set to 1.8; set gammaUp vstr g10; set gammaDown vstr g8"
set g10 "vstr gamma10; echo ^?gamma set to 1.9; set gammaUp vstr g11; set gammaDown vstr g9"
set g11 "vstr gamma11; echo ^?gamma set to 2.0; set gammaUp vstr g12; set gammaDown vstr g10"
set g12 "vstr gamma12; echo ^?gamma set to 2.1; set gammaUp vstr g13; set gammaDown vstr g11"
set g13 "vstr gamma13; echo ^?gamma set to 2.2; set gammaUp vstr g14; set gammaDown vstr g12"
set g14 "vstr gamma14; echo ^?gamma set to 2.3; set gammaUp vstr g15; set gammaDown vstr g13"
set g15 "vstr gamma15; echo ^?gamma set to 2.4; set gammaUp vstr g16; set gammaDown vstr g14"
set g16 "vstr gamma16; echo ^?gamma set to 2.5; set gammaUp vstr g17; set gammaDown vstr g15"
set g17 "vstr gamma17; echo ^?gamma set to 2.6; set gammaUp vstr g18; set gammaDown vstr g16"
set g18 "vstr gamma18; echo ^?gamma set to 2.7; set gammaUp vstr g19; set gammaDown vstr g17"
set g19 "vstr gamma19; echo ^?gamma set to 2.8; set gammaUp vstr g20; set gammaDown vstr g18"
set g20 "vstr gamma20; echo ^?gamma set to 2.9; set gammaUp vstr g21; set gammaDown vstr g19"
set g21 "vstr gamma21; echo ^?gamma set to 3.0; set gammaDown vstr g20"
set gammaUp "vstr g1"
set gammaDown
first we define scripts that change gamma, then call them (1 increases gamma, the other one decreases it), then define the final ones (the ones that call the ones that increase and decrease gamma) and finally bind:
bind ";" "vstr gammaDown"
bind "'" "vstr gammaUp"
note that first script that is called is gammaUp, so it has to be defined too (to a script that calls a script that changes gamma). The script gammaUp, after having been called, automaticlally calls the script gammaDown, so the script gammaDown is left blank (but it also has to be defined using the 'set' command). And no, there's no simplier way to write this:). We COULD write it like this:
set high_performance "vstr a_!; echo ^?performance mode on 1280 x 1200, info in the console; vstr echotime; r_textureMode; cg_crosshairSize; bind F10 vstr ultra_performance"
set ultra_performance "vstr b_!; echo ^?performance mode on 1024 x 1024, info in the console; vstr echotime; r_textureMode; cg_crosshairSize; bind F10 vstr sharpness"
set sharpness "vstr c_!; echo ^?sharpness mode on 1280 x 1200, info in the console; vstr echotime; r_textureMode; cg_crosshairSize; bind F10 vstr high_performance"
set a_! "r_textureMode GL_LINEAR_MIPMAP_NEAREST; r_mode -1; r_customwidth 1280; r_customheight 1200; cg_crosshairSize 24.002; bind F9 vstr chd"
set b_! "r_textureMode GL_LINEAR_MIPMAP_NEAREST; r_mode -1; r_customwidth 1024; r_customheight 1024; cg_crosshairSize 30; bind F9 vstr chd"
set c_! "r_textureMode GL_NEAREST; r_mode -1; r_customwidth 1280; r_customheight 1200; cg_crosshairSize 12.8015875816345205967001; bind F9 vstr cross_hair_dark"
bind F10 "vstr high_performance"
so we simplify the script by calling one less script within. However, this method works for smaller scripts, like the one above. Not to spagghettify to much, the script might also rebind (unbind x; bind x "function") keys to different functions. It's very useful for writing a class script, as x can be binded to medpacks, ammopacks, pliers and satchel depending on who we play. After scripting everything like this, I use 16 keyboard buttons to play (of course without commands like I need a medic etc., thouse buttons are on the square tilde ctrl space 5) regardless of the class I choose. I use 4 mouse buttons; overall 20 'buttonology' makes the game slightly 'smoother' for me.
As for the mouse, go to
http://www.notalent.org/sensitivity/sensitivity.htm and there you'll find how to set it properly. Windows sensitivity should be set to 6/11 to avoid pixel skipping (I know many try to tweak it, and it's better to leave it alone).