NanashiSC

team_specific_bindings.cfg

Jan 9th, 2019
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.63 KB | None | 0 0
  1. echo > Read Team Flag Binds ...
  2. //--------------------------------------------------------------------------------------------------
  3. echo " _______ ______ _ ____ _ _"
  4. echo " |__ __| | ____| | | _ \(_) | |"
  5. echo " | | ___ __ _ _ __ ___ | |__ | | __ _ __ _ | |_) |_ _ __ __| |___"
  6. echo " | |/ _ \/ _` | '_ ` _ \ | __| | |/ _` |/ _` | | _ <| | '_ \ / _` / __|"
  7. echo " | | __/ (_| | | | | | | | | | | (_| | (_| | | |_) | | | | | (_| \__ \"
  8. echo " |_|\___|\__,_|_| |_| |_| |_| |_|\__,_|\__, | |____/|_|_| |_|\__,_|___/"
  9. echo " __/ |"
  10. echo " Author: /u/NanashiSC |___/"
  11. echo " Version: 2019-02-05"
  12. echo " for updates, go visit https://pastebin.com/Z63LRPdT"
  13. //--------------------------------------------------------------------------------------------------
  14. // Reddit-Thread: https://www.reddit.com/r/CounterStrikeBinds/comments/adhzfh/buy_bind/
  15. //--------------------------------------------------------------------------------------------------
  16. // General Description: This Script allows you to create Team specific bindings. The easiest way to
  17. // achieve this goal would have been to create a Teamgflag Toggle KEY and to alter wished binds
  18. // accordingly. But I wanted to keep the team flagging process as unintrusive as possible, and
  19. // therefore decided to use team unique items (C4, Defuser) as indicators.
  20. //
  21. // The script you will see further below, has been designed to meet one specific task, which has been
  22. // to: buy M4 and Aug as CT but just an AK47 as T - with the very same Key!
  23. // But of course the potential is there. So feel free to extend or alter this script to your needs.
  24. //
  25. // TL;DR: Here are the essential Keybinds for this script:
  26. //
  27. // 5 (C4) = set flag T
  28. // alt + e (buy defuser) = set flag CT
  29. // KEY = buy M4 and Aug as CT / AK47 as T //make sure to change KEY under "Binds"
  30. //
  31. // Note: You can also create additional binds, like print_team_flag, and toggle_team_flag but
  32. // they are all optional.
  33. //--------------------------------------------------------------------------------------------------
  34. // Set Team Flags (for Team specific binds) by /u/Nanashi --->
  35. //--------------------------------------------------------------------------------------------------
  36. // Press 5 to set flag to t (C4 unique to team T)
  37. // Press alt+e to set flag to ct (defuser unique to team CT)
  38. //--------------------------------------------------------------------------------------------------
  39. // Set FLag AND Toggle Flaggability --->
  40. //--------------------------------------------------------------------------------------------------
  41. // flag ON (mute key - wont set any flags)
  42. //--------------------------------------------------------------------------------------------------
  43. alias flag_5_on "bind 5 slot5" //default bind when flag set to T
  44. alias flag_alt_e_on "alias secE "buy defuser";" //default bind when flag set to CT
  45. //--------------------------------------------------------------------------------------------------
  46. // flag OFF (mute key - set team flags)
  47. //--------------------------------------------------------------------------------------------------
  48. // Note: some binds are too complex for one line of code in such cases you have to create one alias
  49. // with the commands you want the key to execute and another one in which you will bind
  50. // said commands to said key again
  51. //--------------------------------------------------------------------------------------------------
  52. alias 5_off "slot5; team_t"
  53. alias alt_e_off "buy defuser; team_ct"
  54. alias flag_5_off "bind 5 5_off"
  55. alias flag_alt_e_off "alias secE alt_e_off"
  56. //--------------------------------------------------------------------------------------------------
  57. // Set Flag
  58. //--------------------------------------------------------------------------------------------------
  59. // Note: My intention with the lines below is to reduce accidental switching of team flags while ...
  60. // playing the game by muting (bind to default) active keys and vice versa.
  61. //--------------------------------------------------------------------------------------------------
  62. alias flag_t "flag_5_on; flag_alt_e_off" //or flag_t //e gets overwritten, next time you press e, flag will be set to T
  63. alias flag_ct "flag_alt_e_on; flag_5_off" //or flag_ct //5 gets overwritten, next time you press 5, flag will be set to CT
  64. //--------------------------------------------------------------------------------------------------
  65. // <--- Set FLag AND Toggle Flaggability
  66. //--------------------------------------------------------------------------------------------------
  67. // Aug Buy Status
  68. //--------------------------------------------------------------------------------------------------
  69. alias aug_flag //switching teams will switch you aug flags as well
  70. alias buy_aug_on "buy aug" //when on team CT
  71. alias buy_aug_off "" //when on team T
  72. //--------------------------------------------------------------------------------------------------
  73. // Feedback (text to chat)
  74. //--------------------------------------------------------------------------------------------------
  75. alias flag_text_ct "say_team "Team Flag set to CT (press "KEY" to buy M4, Aug)";" //change text as you like
  76. alias flag_text_t "say_team "Team Flag set to T (press "KEY" to buy AK47)";" //change text as you like
  77. //--------------------------------------------------------------------------------------------------
  78. // Call Flag Status (print current flag status to chat)
  79. //--------------------------------------------------------------------------------------------------
  80. alias print_team_flag "say_team "Team Flag not set";"
  81. //--------------------------------------------------------------------------------------------------
  82. // Swap Team
  83. //--------------------------------------------------------------------------------------------------
  84. alias toggle_team_flag //points towards unflagged team
  85. alias team_ct "alias aug_flag buy_aug_on; flag_ct; alias print_team_flag flag_text_ct; print_team_flag; alias toggle_team_flag team_t"
  86. alias team_t "alias aug_flag buy_aug_off; flag_t; alias print_team_flag flag_text_t; print_team_flag; alias toggle_team_flag team_ct"
  87. //--------------------------------------------------------------------------------------------------
  88. // <--- Set Team FLags (for Team specific binds)
  89. //--------------------------------------------------------------------------------------------------
  90. // Binds --->
  91. //--------------------------------------------------------------------------------------------------
  92. bind 5 "slot5; team_t"
  93. bind KEY print_team_flag //prints current FLag to teamchat
  94. bind KEY "buy m4a1; buy ak47; aug_flag" //CHANGE ME SENPAI!
  95. bind KEY toggle_team_flag //allows you to toggly between team-flags by pressing a key of your choice
  96. //--------------------------------------------------------------------------------------------------
  97. // <--- Binds
  98. //--------------------------------------------------------------------------------------------------
  99. // Altbinds --->
  100. //--------------------------------------------------------------------------------------------------
  101. // Set ALT/Default Keybinds
  102. //--------------------------------------------------------------------------------------------------
  103. // pri = primary
  104. // mod = modifier
  105. // sec = secondary
  106. //--------------------------------------------------------------------------------------------------
  107. // Key-E
  108. //--------------------------------------------------------------------------------------------------
  109. alias priE "bind e +use"
  110. alias modE "bind e secE"
  111. alias secE "buy defuser; team_ct"
  112. //--------------------------------------------------------------------------------------------------
  113. // Set +ALT/-ALT
  114. //--------------------------------------------------------------------------------------------------
  115. alias +altbinds "modE" //Alt+Key assignments
  116. alias -altbinds "priE" //Default-Key assignments
  117. //--------------------------------------------------------------------------------------------------
  118. // Bind ALT
  119. //--------------------------------------------------------------------------------------------------
  120. bind ALT +altbinds
  121. //--------------------------------------------------------------------------------------------------
  122. // <--- Altbinds
  123. //--------------------------------------------------------------------------------------------------
  124. // <--- Set Team Flags (for Team specific binds) by /u/Nanashi
  125. //--------------------------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment