I need a little help with my script. I want to make a script to change from primary(ak) to secondary(shotty). I only want to use one key to toggle back and forth. Primary/secondary. The only catch is, I wanna have crosshair 1 on the ak, and crosshair 2 on the shotty, along with different sizes. I've seen it done and can do it on the scroll wheel, but don't wanna use the wheel.
So I wanna be able to select the ak with a dot crosshair at size (x), and then switch to the shotty with the normal crosshair at size (x). Anyone help me out with this? I'm close, but not close enough : (. Thanks.
Hello there. I have just tested this script and it works perfectly:
bind mouse3 "vstr weap5" set weap5 "weapon 5; cg_Crosshairsize 24; cg_drawCrosshair 1;bind mouse3 vstr weap3" set weap3 "weapon 3; cg_Crosshairsize 50; cg_drawCrosshair 2;bind mouse3 vstr weap5"
I have based the toggle around the mouse3 (or middle mouse button) but this can be any key you choose. You did not state the cross hair sizes so i set the AK dot cross hair on the standard 24 and the shotgun on an oversized 50! Thease values can be changed to any value to suit you.
I presume by your post you know how to set your config file up so please let me know how you get on.
Works great, thanks alot. :bows: :bows:
Ok, it works fine. But I guess in my attempt to get my point across, I may have confused the issue. :confused:
What I really would like to have the script to do is change the crosshairs on primary/secondary weapons. I don't always use the ak, it maybe the mp5 or sniper rifle. I need the dot crosshair 1 to work on the primary weapon, while the crosshair 2 works on the secondary weapon, which most of the time will be the shotty.
I used the script earlier and it works perfect. Just would like to tweak it a bit.
Thanks if you can help. :cya:
The script i outlined above can work between any 2 weapons. If you want to toggle between the mp5 and and the shotty then the code can be subtly changed: bind mouse3 "vstr weap4" set weap4 "weapon 4; cg_Crosshairsize 24; cg_drawCrosshair 1;bind mouse3 vstr weap3" set weap3 "weapon 3; cg_Crosshairsize 50; cg_drawCrosshair 2;bind mouse3 vstr weap4" If you want the script to change only the crosshair then use the following: bind mouse3 "vstr hair5" set hair5 "cg_Crosshairsize 24; cg_drawCrosshair 1;bind mouse3 vstr hair3" set hair3 "cg_Crosshairsize 50; cg_drawCrosshair 2;bind mouse3 vstr hair5" This may have given you enough to invent your own scripts! Try it out.
Thanks again for yer help.
But I want a script that will work on the primary and secondary weapons all the time. No matter if I start a map with the ak, then switch to mp5. I don't want to make a bind for each weapon. Just want one to switch between primary and secondary. I also don't want to switch weapons (like between primary and secondary) then have to press another key to switch the crosshair. I've seen a script that sorta works like I want, except it uses the scroll wheel. Up for primary, down for secondary. But I don't wanna use the scroll wheel, and that's also like using 2 buttons.
I use one key to always switch between my primary weapon (ak, mp5, sniper) and my secondary weapon (shotty, uzi). Just need a script that will change the crosshair between the two. I've written two scripts like this:
bind (x) "weaptoggle primary; cg_drawCrosshair 1 ; cg_crosshairSize 20 ; cg_crosshairRGBA 1,0,0.2,1 "
bind (y) "weaptoggle secondary; cg_drawCrosshair 2 ; cg_crosshairSize 24 ; cg_crosshairRGBA 1,0,0.2,1 "
It sets the weapon, crosshair, size and color. So when I press (x) it switches between primary and secondary ok, but I'm stuck with the dot crosshair on the shotty. When I press (y), same thing except I have the standard crosshair. If I press (y) again, it'll switch weapon, but not the crosshair. Confused now? :confused: lol.
It toggles between primary and secondary fine, it just stays on one crosshair.
Can I incorporate both scripts into one, so I only have to press one button?
Thanks a bunch. :cya:
Yes you can m8 and now i understand what you need from the script the solution is actually quite straightforward: bind g "vstr togg0" set togg0 "weaptoggle secondary primary ;cg_drawCrosshair 1; cg_crosshairSize 20; cg_crosshairRGBA 1,0,0.2,1; bind g vstr togg1 " set togg1 "weaptoggle primary secondary ;cg_drawCrosshair 2; cg_crosshairSize 24; cg_crosshairRGBA 1,0,0.2,1; bind g vstr togg0 " This will toggle between primary and secondary weapons including your individual weapon crosshair alterations from one key. I have used the key "g" as the toggle. I have tested it and it works very well. :) Please post your comments.
Indeed, works perfectly. :D Thanks "m8".
Only had to reverse the crosshair numbers so the dot works on primary. ;)
Thanks for all your help. :bows: :bows: :bows:
Sof2 Modler and Modder
22nd February 2004
Can you just make the crosshair for one weapon and then have the other ones stay the same
This is an old thread but to answer your question Yes. If you bind your weapon select keys with an additional ";cg_drawCrosshair 1" (or other crosshair) the weapon select key will select your chosen crosshair too.