Advertisement
Guest User

Weapon Quickswitch: Engineer version

a guest
Jun 8th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. // This script allows crosshair and viewmodel settings to switch with the active weapon and with quickswitch
  2. // 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
  3. // 4 and 5 slot versions also available (4 slot includes watch support)
  4.  
  5. // Written, adapted, and modified by /u/genemilder (http://steamcommunity.com/id/seventy_one)
  6.  
  7. //Modified and attempted bugfix by Lunamann
  8. //Goal: Allow access of Primary, Secondary, and Melee with mousewheel and Build/Destroy menus with Z and X.
  9.  
  10.  
  11. // ========== SETTINGS ==========
  12.  
  13.  
  14. alias equip_primary "slot1"
  15. alias equip_secondary "slot2"
  16. alias equip_melee "slot3"
  17. alias equip_build "slot4"
  18. alias equip_destroy "slot5"
  19. //Addition of equip_build and equip_destroy by Lunamann
  20.  
  21.  
  22. // ========== QUICKSWITCH ==========
  23. // Quickswitch works correctly when choosing weapons using only the keys detailed in binds section
  24.  
  25.  
  26. alias prev equip_s2p
  27. alias next equip_m2p
  28. //Hotfix applied by Lunamann to attempt to solve problem of mousewheel (well, all methods of weaponswitching)
  29. //being completely nonfunctional. The problem: Mousewheel was bound to prev and next,
  30. //but prev and next were not defined at all.
  31.  
  32.  
  33. alias qs_primary "alias next equip_s2p; alias prev equip_m2p; alias primary equip_primary; alias secondary equip_s2p; alias melee equip_m2p"
  34. alias qs_secondary "alias next equip_m2s; alias prev equip_p2s; alias primary equip_p2s; alias secondary equip_secondary; alias melee equip_m2s"
  35. alias qs_melee "alias next equip_p2m; alias prev equip_s2m; alias primary equip_p2m; alias secondary equip_s2m; alias melee equip_melee"
  36.  
  37. alias equip_p2s "equip_primary; alias switch equip_s2p"
  38. alias equip_p2m "equip_primary; alias switch equip_m2p"
  39.  
  40. alias equip_s2m "equip_secondary; alias switch equip_m2s"
  41. alias equip_s2p "equip_secondary; alias switch equip_p2s"
  42.  
  43. alias equip_m2p "equip_melee; alias switch equip_p2m"
  44. alias equip_m2s "equip_melee; alias switch equip_s2m"
  45.  
  46.  
  47.  
  48.  
  49. // ========== BINDS ==========
  50. // If a slot is unavailable, anything bound to prev/next will not account for the unavailability (click twice to get to the available slot)
  51.  
  52.  
  53. bind "mwheelup" "prev"
  54. //BUG as of after hotfix: Will only switch to Secondary. Repeated usage does nothing if already Secondary.
  55. bind "mwheeldown" "next"
  56. //BUG as of after hotfix: Will only switch to Melee. Repeated usage does nothing if already Melee.
  57. bind "1" "primary"
  58. bind "2" "secondary"
  59. bind "3" "melee"
  60. //These go unused.
  61. bind "q" "switch"
  62. //BUG as of after hotfix: Will only switch to Primary. Repeated usage does nothing if already Primary.
  63. bind "z" "equip_build"
  64. bind "x" "equip_destroy"
  65. //Both of these work as intended.
  66.  
  67.  
  68. // ========== Initialize aliases and report success in console ==========
  69.  
  70.  
  71. equip_p2s
  72.  
  73. developer 1
  74. echo "Success:Weaponswitch Online"
  75. //Echo modified by Lunamann. This is a weaponswitch not a viewmodel modification
  76. developer 0
  77.  
  78.  
  79. // ========== SCRIPT OVERWRITES ==========
  80. // To undo changes from the above script
  81.  
  82. //bind "1" "slot1"
  83. //bind "2" "slot2"
  84. //bind "3" "slot3"
  85. //bind "MWHEELUP" "invprev"
  86. //bind "MWHEELDOWN" "invnext"
  87. //bind "q" "lastinv"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement