Guest User

Spy

a guest
Oct 31st, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. unbind /
  2.  
  3. // This script allows settings to switch with the active weapon.
  4. // Only the first 3 slots will be tracked by the scroll wheel and q, specifically this excludes the disguise kit (Spy) and the PDAs (Engineer).
  5. // Medic, Spy, Engineer, and permanent non-active weapon versions are also available, contact the author below.
  6.  
  7. // The script will only work correctly when switching with keys in the BIND section.
  8. // The script cannot know if a weapon switched for any other reason than player input using the keys in the BIND section.
  9. // The script cannot know if a weapon switched successfully, and will always assume it has. Examples that prevent/impede switching:
  10. // - Permanent or temporary non-active weapon like gunboats or a melted spy-cicle
  11. // - Minigun spinup/spindown
  12.  
  13.  
  14. // Written by /u/genemilder (http://steamcommunity.com/id/Seventy_one)
  15.  
  16.  
  17. // ========== INSTRUCTIONS ==========
  18.  
  19. // Edit r_drawviewmodel in the SETTINGS section for whether viewmodels are turned on (1) or off (0)
  20. // r_drawviewmodel in the eq_ aliases is activated when switching to that weapon
  21.  
  22. // To add additional settings on weapon switch, append them to the eq_ aliases.
  23.  
  24. // To change which keys can switch weapons, change or add lines in the BINDS section, binding keys only to the aliases already in the binds section
  25. // Multiple keys can be bound to the same alias and the script will still work correctly
  26.  
  27. // See the following for information on how to install scripts and how to make them class-specific:
  28. // http://www.reddit.com/r/tf2scripthelp/wiki/introduction
  29.  
  30. // To "undo" the script and changes made, remove the script from your relevant cfg files and execute the lines in the SCRIPT OVERWRITE section (remove the comment marks first)
  31.  
  32.  
  33. // ========== BINDS ==========
  34.  
  35. bind 1 eq_slot1
  36. bind 2 eq_slot2
  37. bind 3 eq_slot3
  38. bind mwheelup eq_invprev
  39. bind mwheeldown eq_invnext
  40. bind q eq_13
  41. bind mouse5 eq_slot3
  42.  
  43.  
  44. // ========== SETTINGS ==========
  45.  
  46. alias eq_slot1 "slot1; alias eq_invnext eq_slot2; alias eq_invprev eq_slot3; alias eq_13 eq_slot3; r_drawviewmodel 0"
  47. alias eq_slot2 "slot2; alias eq_invnext eq_slot3; alias eq_invprev eq_slot1; alias eq_13 eq_slot1; r_drawviewmodel 1"
  48. alias eq_slot3 "slot3; alias eq_invnext eq_slot1; alias eq_invprev eq_slot2; alias eq_13 eq_slot1; r_drawviewmodel 1"
  49.  
  50.  
  51. // ========== INITIALIZE ==========
  52.  
  53. eq_slot1
  54.  
  55.  
  56. // ========== SCRIPT OVERWRITE ==========
  57.  
  58. //r_drawviewmodel 1
  59. //bind 1 slot1
  60. //bind 2 slot2
  61. //bind 3 slot3
  62. //bind mwheelup invprev
  63. //bind mwheeldown invnext
  64. //bind q lastinv
  65. //unbind mouse4
  66.  
  67. //Commands
  68. bind mwheelup "voicemenu 2 0"
  69. bind mwheeldown "voicemenu 1 1"
  70. unbind "r"
  71. unbind "shift"
  72. bind r "voicemenu 0 1"
  73. bind shift "voicemenu 2 6"
  74. viewmodel_fov 85
Add Comment
Please, Sign In to add comment