I made a little script for personal use and figured someone else might want to use it.
What it does is allow you to change your crosshair without opening console and using console commands, which would require you to temporarily hide the crosshair while you type into the console. Not only can it change the crosshair shape, it can change the size and color too.
Here's how it works:
1. Hold CTRL to activate the script (you can change it to another key if desired).
2. Use the MOUSE4 and MOUSE5 keys to cycle through the crosshairs.
3. Use the mousewheel to change the size of the crosshair.
4. Tap the R, G, or B keys (no need to hold them down) to change the red, green, or blue color values respectively (again by using the mousewheel).
5. Let go of CTRL, and your R, G, B, MOUSE4, MOUSE5, and mousewheel binds will return to normal (which you should set in the script).
Here's the script (put it in your autoexec or class configs):
///// Crosshair Changer /////
// Script Binds
bind "R" "rkey"
bind "G" "+taunt"
bind "B" "bkey"
bind "MWHEELUP" "mousewheelup"
bind "MWHEELDOWN" "mousewheeldown"
bind "MOUSE4" "mouse4key"
bind "MOUSE5" "mouse5key"
// Default Binds -- change these to your liking
alias "rkey" "+reload"
alias "bkey" "lastdisguise"
alias "mousewheelup" "invprev"
alias "mousewheeldown" "invnext"
alias "mouse4key" ""
alias "mouse5key" ""
// Script
bind "CTRL" "+togglestate"
alias "+togglestate" "bind R incred; bind G incgreen; bind B incblue; bind MWHEELUP plusscale; bind MWHEELDOWN minusscale; bind MOUSE4 nextcross; bind MOUSE5 prevcross"
alias "-togglestate" "bind R rkey; bind G +taunt; bind B bkey; bind MWHEELUP mousewheelup; bind MWHEELDOWN mousewheeldown; bind MOUSE4 mouse4key; bind MOUSE5 mouse5key"
alias "incred" "mwheelred"
alias "incgreen" "mwheelgreen"
alias "incblue" "mwheelblue"
alias "mwheelred" "bind mwheelup plusred; bind mwheeldown minusred"
alias "mwheelgreen" "bind mwheelup plusgreen; bind mwheeldown minusgreen"
alias "mwheelblue" "bind mwheelup plusblue; bind mwheeldown minusblue"
alias "plusred" "incrementvar cl_crosshair_red 0 255 15"
alias "minusred" "incrementvar cl_crosshair_red 0 255 -15"
alias "plusgreen" "incrementvar cl_crosshair_green 0 255 15"
alias "minusgreen" "incrementvar cl_crosshair_green 0 255 -15"
alias "plusblue" "incrementvar cl_crosshair_blue 0 255 15"
alias "minusblue" "incrementvar cl_crosshair_blue 0 255 -15"
alias "plusscale" "incrementvar cl_crosshair_scale 18 48 1"
alias "minusscale" "incrementvar cl_crosshair_scale 18 48 -1"
alias "cross0" "exec defaultcrosshair; alias nextcross cross1; alias prevcross cross7"
alias "nextcross" "cross0"
alias "prevcross" "cross7"
alias "cross1" "cl_crosshair_file crosshair1; alias nextcross cross2; alias prevcross cross0"
alias "cross2" "cl_crosshair_file crosshair2; alias nextcross cross3; alias prevcross cross1"
alias "cross3" "cl_crosshair_file crosshair3; alias nextcross cross4; alias prevcross cross2"
alias "cross4" "cl_crosshair_file crosshair4; alias nextcross cross5; alias prevcross cross3"
alias "cross5" "cl_crosshair_file crosshair5; alias nextcross cross6; alias prevcross cross4"
alias "cross6" "cl_crosshair_file crosshair6; alias nextcross cross7; alias prevcross cross5"
alias "cross7" "cl_crosshair_file crosshair7; alias nextcross cross0; alias prevcross cross6"
One last thing: create a config file called defaultcrosshair.cfg with the following entry:
cl_crosshair_file ""
(This enables you to cycle to the default crosshair in the script.)
EDIT: fixed script breaking taunts.
I made a little script for personal use and figured someone else might want to use it.
What it does is allow you to change your crosshair without opening console and using console commands, which would require you to temporarily hide the crosshair while you type into the console. Not only can it change the crosshair shape, it can change the size and color too.
Here's how it works:
1. Hold CTRL to activate the script (you can change it to another key if desired).
2. Use the MOUSE4 and MOUSE5 keys to cycle through the crosshairs.
3. Use the mousewheel to change the size of the crosshair.
4. Tap the R, G, or B keys (no need to hold them down) to change the red, green, or blue color values respectively (again by using the mousewheel).
5. Let go of CTRL, and your R, G, B, MOUSE4, MOUSE5, and mousewheel binds will return to normal (which you should set in the script).
Here's the script (put it in your autoexec or class configs):
[code]///// Crosshair Changer /////
// Script Binds
bind "R" "rkey"
bind "G" "+taunt"
bind "B" "bkey"
bind "MWHEELUP" "mousewheelup"
bind "MWHEELDOWN" "mousewheeldown"
bind "MOUSE4" "mouse4key"
bind "MOUSE5" "mouse5key"
// Default Binds -- change these to your liking
alias "rkey" "+reload"
alias "bkey" "lastdisguise"
alias "mousewheelup" "invprev"
alias "mousewheeldown" "invnext"
alias "mouse4key" ""
alias "mouse5key" ""
// Script
bind "CTRL" "+togglestate"
alias "+togglestate" "bind R incred; bind G incgreen; bind B incblue; bind MWHEELUP plusscale; bind MWHEELDOWN minusscale; bind MOUSE4 nextcross; bind MOUSE5 prevcross"
alias "-togglestate" "bind R rkey; bind G +taunt; bind B bkey; bind MWHEELUP mousewheelup; bind MWHEELDOWN mousewheeldown; bind MOUSE4 mouse4key; bind MOUSE5 mouse5key"
alias "incred" "mwheelred"
alias "incgreen" "mwheelgreen"
alias "incblue" "mwheelblue"
alias "mwheelred" "bind mwheelup plusred; bind mwheeldown minusred"
alias "mwheelgreen" "bind mwheelup plusgreen; bind mwheeldown minusgreen"
alias "mwheelblue" "bind mwheelup plusblue; bind mwheeldown minusblue"
alias "plusred" "incrementvar cl_crosshair_red 0 255 15"
alias "minusred" "incrementvar cl_crosshair_red 0 255 -15"
alias "plusgreen" "incrementvar cl_crosshair_green 0 255 15"
alias "minusgreen" "incrementvar cl_crosshair_green 0 255 -15"
alias "plusblue" "incrementvar cl_crosshair_blue 0 255 15"
alias "minusblue" "incrementvar cl_crosshair_blue 0 255 -15"
alias "plusscale" "incrementvar cl_crosshair_scale 18 48 1"
alias "minusscale" "incrementvar cl_crosshair_scale 18 48 -1"
alias "cross0" "exec defaultcrosshair; alias nextcross cross1; alias prevcross cross7"
alias "nextcross" "cross0"
alias "prevcross" "cross7"
alias "cross1" "cl_crosshair_file crosshair1; alias nextcross cross2; alias prevcross cross0"
alias "cross2" "cl_crosshair_file crosshair2; alias nextcross cross3; alias prevcross cross1"
alias "cross3" "cl_crosshair_file crosshair3; alias nextcross cross4; alias prevcross cross2"
alias "cross4" "cl_crosshair_file crosshair4; alias nextcross cross5; alias prevcross cross3"
alias "cross5" "cl_crosshair_file crosshair5; alias nextcross cross6; alias prevcross cross4"
alias "cross6" "cl_crosshair_file crosshair6; alias nextcross cross7; alias prevcross cross5"
alias "cross7" "cl_crosshair_file crosshair7; alias nextcross cross0; alias prevcross cross6"[/code]
One last thing: create a config file called defaultcrosshair.cfg with the following entry:
[code]cl_crosshair_file ""[/code]
(This enables you to cycle to the default crosshair in the script.)
EDIT: fixed script breaking taunts.