Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This script allows crosshair and viewmodel settings to switch with the active weapon and with quickswitch
- // Only the first 3 slots will be tracked by the scroll wheel and quickswitch, so be cognizant of that when using this script with engineer or spy
- // 4 and 5 slot versions also available (4 slot includes watch support)
- // Written, adapted, and modified by /u/genemilder (http://steamcommunity.com/id/seventy_one)
- //Modified and attempted bugfix by Lunamann
- //Goal: Allow access of Primary, Secondary, and Melee with mousewheel and Build/Destroy menus with Z and X.
- // ========== SETTINGS ==========
- alias equip_primary "slot1"
- alias equip_secondary "slot2"
- alias equip_melee "slot3"
- alias equip_build "slot4"
- alias equip_destroy "slot5"
- //Addition of equip_build and equip_destroy by Lunamann
- // ========== QUICKSWITCH ==========
- // Quickswitch works correctly when choosing weapons using only the keys detailed in binds section
- alias prev equip_s2p
- alias next equip_m2p
- //Hotfix applied by Lunamann to attempt to solve problem of mousewheel (well, all methods of weaponswitching)
- //being completely nonfunctional. The problem: Mousewheel was bound to prev and next,
- //but prev and next were not defined at all.
- alias qs_primary "alias next equip_s2p; alias prev equip_m2p; alias primary equip_primary; alias secondary equip_s2p; alias melee equip_m2p"
- alias qs_secondary "alias next equip_m2s; alias prev equip_p2s; alias primary equip_p2s; alias secondary equip_secondary; alias melee equip_m2s"
- alias qs_melee "alias next equip_p2m; alias prev equip_s2m; alias primary equip_p2m; alias secondary equip_s2m; alias melee equip_melee"
- alias equip_p2s "equip_primary; alias switch equip_s2p"
- alias equip_p2m "equip_primary; alias switch equip_m2p"
- alias equip_s2m "equip_secondary; alias switch equip_m2s"
- alias equip_s2p "equip_secondary; alias switch equip_p2s"
- alias equip_m2p "equip_melee; alias switch equip_p2m"
- alias equip_m2s "equip_melee; alias switch equip_s2m"
- // ========== BINDS ==========
- // If a slot is unavailable, anything bound to prev/next will not account for the unavailability (click twice to get to the available slot)
- bind "mwheelup" "prev"
- //BUG as of after hotfix: Will only switch to Secondary. Repeated usage does nothing if already Secondary.
- bind "mwheeldown" "next"
- //BUG as of after hotfix: Will only switch to Melee. Repeated usage does nothing if already Melee.
- bind "1" "primary"
- bind "2" "secondary"
- bind "3" "melee"
- //These go unused.
- bind "q" "switch"
- //BUG as of after hotfix: Will only switch to Primary. Repeated usage does nothing if already Primary.
- bind "z" "equip_build"
- bind "x" "equip_destroy"
- //Both of these work as intended.
- // ========== Initialize aliases and report success in console ==========
- equip_p2s
- developer 1
- echo "Success:Weaponswitch Online"
- //Echo modified by Lunamann. This is a weaponswitch not a viewmodel modification
- developer 0
- // ========== SCRIPT OVERWRITES ==========
- // To undo changes from the above script
- //bind "1" "slot1"
- //bind "2" "slot2"
- //bind "3" "slot3"
- //bind "MWHEELUP" "invprev"
- //bind "MWHEELDOWN" "invnext"
- //bind "q" "lastinv"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement