Forum
someone please help?
Created 20th May 2009 @ 11:45
Add A Reply Pages: 1
I’m having a bit of trouble with this script. Basically I want no crosshair when I’m scoped in but crosshair3 for unscoped. This means I have to make a script that:
– on zooming in takes the crosshair off, but on zooming out (just incase i don’t shoot) puts it back on. I tried to use a toggle here but it doesn’t seem to work.
– on shooting returns to the crosshair (i have rezoom OFF) which should be done with the mouse1 bind but im not sure if that works.
bind MOUSE1 “+attack;cl_crosshair_file “crosshair3”
bind MOUSE2 “+attack2;xhairToggle”
alias “xhairToggle” “xhairoff”
alias “xhairoff” “cl_crosshair_file “”;alias xhairToggle xhairon”
alias “xhairon” “cl_crosshair_file “crosshair3″;alias xhairToggle xhairoff”
If anyone could point out what I’ve done wrong that would be very helpful. I think I might have named the blank crosshair wrong or something?
http://tf2wiki.net/wiki/Sniper_scripts
Dunno anything about scripts but it it should help :)
ok thanks i guess theres no point trying to be smart when others can do everything for you :D
or not. the scripts on there dont work :)
I can’t check the script myself right now. But it looks like the problem is that the aliases only consist out of the cl_crosshair_file part and ignore the part after it because of the way the quotation marks are put in. I’m not sure how to fix that, but I can take a look at it when I get home.
By the way, there is an easy way to check your scripts. Just put them in your autoexec and create a server. Next open the console and type in an alias to see if it works. So in this case just type “xhairon” and see if it does what you want it to do. After that try xhairoff and xhairtoggle and so on.
I can’t check the script myself right now. But it looks like the problem is that the aliases only consist out of the cl_crosshair_file part and ignore the part after it because of the way the quotation marks are put in. I’m not sure how to fix that, but I can take a look at it when I get home.
By the way, there is an easy way to check your scripts. Just put them in your autoexec and create a server. Next open the console and type in an alias to see if it works. So in this case just type “xhairon” and see if it does what you want it to do. After that try xhairoff and xhairtoggle and so on.
Cheers, hopefully I can sort this. I already tried crosshair “0” or crosshair “1” but they don’t seem to work.
cl_crosshair_file crosshair3
alias myxhair “cl_crosshair_file crosshair3”
alias noxhair “cl_crosshair_file ”alias +sniperatck “+attack; xhairon”
alias -sniperatck “-attack”
alias +sniperzm “+attack2; xhairToggle”
alias -sniperzm “-attack2”bind MOUSE1 “+sniperatck”
bind MOUSE2 “+sniperzm”alias xhairToggle xhairoff
alias xhairoff “noxhair; alias xhairToggle xhairon”
alias xhairon “myxhair; alias xhairToggle xhairoff”
This works except for 1 error with getting the no crosshair. I used the invisible character trick and it does work when I copy it directly into the console, however it doesn’t work when I put it into the sniper.cfg.
(this line: alias noxhair “cl_crosshair_file ”)
EDIT:
I found a small workaround:
Make a file called crosshairoff.cfg and put (cl_crosshair_file “”) in there.
And use this in the script (alias noxhair “exec crosshairoff.cfg”) instead of the other line.
The script should work now, just remember that you might need to replace the quotation marks if you copy paste the above. For some strange reason they messed up if I copy pasted them to my sniper.cfg.
Thanks mate. I’ve just been playing plants vs zombies but I’ll give it a try now.
crosshairs for noobs anyway :
you must have a huge crosshair then
Add A Reply Pages: 1