Upvote Upvoted 3 Downvote Downvoted
help with scripting for weaponswitching/crosshair
posted in Q/A Help
1
#1
0 Frags +

Hi, what i'm trying to achieve is to script my class cfg to switch weapons and change crosshair at the same time when i scroll my mouse. This is relatively easy to do, however I encountered an issue when it involves the default crosshair, cl_crosshair_file ""

When I use this, it works fine

bind MWHEELUP "cl_crosshair_file crosshair7; slot1"
bind MWHEELDOWN "cl_crosshair_file crosshair3; slot2"
bind 1 slot3

However when I change crosshair3 to ""

bind MWHEELUP "cl_crosshair_file crosshair7; slot1"
bind MWHEELDOWN "cl_crosshair_file ""; slot2"
bind 1 slot3

the bind stops working, and although the weapons switch, the crosshair does not.
Any help regarding this would be appreciated, thank you :D

Hi, what i'm trying to achieve is to script my class cfg to switch weapons and change crosshair at the same time when i scroll my mouse. This is relatively easy to do, however I encountered an issue when it involves the default crosshair, cl_crosshair_file ""

When I use this, it works fine
[code]bind MWHEELUP "cl_crosshair_file crosshair7; slot1"
bind MWHEELDOWN "cl_crosshair_file crosshair3; slot2"
bind 1 slot3[/code]

However when I change crosshair3 to ""
[code]bind MWHEELUP "cl_crosshair_file crosshair7; slot1"
bind MWHEELDOWN "cl_crosshair_file ""; slot2"
bind 1 slot3[/code]

the bind stops working, and although the weapons switch, the crosshair does not.
Any help regarding this would be appreciated, thank you :D
2
#2
0 Frags +

you could write an alias for cl crosshair file ""

you could write an alias for cl crosshair file ""
3
#3
0 Frags +
bind MWHEELUP "sniperup"
bind MWHEELDOWN "sniperdown"
bind 1 slot3

alias "sniperup" "cl_crosshair_file crosshair7; slot1"

alias "sniperdown" "cl_crosshair_file ""; slot2"

Do you mean like this? I tried it as well and it didn't work

[code]bind MWHEELUP "sniperup"
bind MWHEELDOWN "sniperdown"
bind 1 slot3

alias "sniperup" "cl_crosshair_file crosshair7; slot1"

alias "sniperdown" "cl_crosshair_file ""; slot2"[/code]

Do you mean like this? I tried it as well and it didn't work
4
#4
3 Frags +

cl_crosshair_file "" has always been a pain for scripting but there's an easy workaround
in your cfg folder make a new cfg file. give it any name. example: xhair.cfg
Open it in notepad and put cl_crosshair_file "" in it.
Now whenever you want your bind to use it you use the command Exec xhair

cl_crosshair_file "" has always been a pain for scripting but there's an easy workaround
in your cfg folder make a new cfg file. give it any name. example: xhair.cfg
Open it in notepad and put cl_crosshair_file "" in it.
Now whenever you want your bind to use it you use the command Exec xhair
5
#5
3 Frags +
Tobcl_crosshair_file "" has always been a pain for scripting but there's an easy workaround
in your cfg folder make a new cfg file. give it any name. example: xhair.cfg
Open it in notepad and put cl_crosshair_file "" in it.
Now whenever you want your bind to use it you use the command Exec xhair

oh shit /thread right there, thanks man

[quote=Tob]cl_crosshair_file "" has always been a pain for scripting but there's an easy workaround
in your cfg folder make a new cfg file. give it any name. example: xhair.cfg
Open it in notepad and put cl_crosshair_file "" in it.
Now whenever you want your bind to use it you use the command Exec xhair[/quote]
oh shit /thread right there, thanks man
Please sign in through STEAM to post a comment.