Counter-Strike 2

Counter-Strike 2

Not enough ratings
How to have multiple binds in a key
By Dominicis
Here you'll see how to set an alias that helps to make multiple binds in one key. And by the way, i don't speak really well english but i'm doing my best.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Well, first let me explain what it is. For example, with 1 i select my primary weapon, but if you press 2, and then 1, you select the knife. That's what i'm going to explain here.
For this example in particular you will need this code.


bind "1" "primary"
bind "2" "switch; first"
alias "second" "bind "2" "sec" "
alias "sec" "switch; first"
alias "switch" "bind "1" "slot3" "
alias "first" "bind "2" "change"
alias "change" "bind "1" "primary" "
alias "primary" "slot1; second"

Well, i'll explain the alias i used.
  • "primary" this alias will change your weapon to the rifle one, and call the other alias "second"
  • "second" this alias will change the bind of 2, to make the switch between knife and rifle.
  • "switch" this is literally the command that binds 1 to the knife
  • "first" this will bind 2 to the alias change, it's difficult to explain why there's two alias for one thing, but i will say that if you put the two thing together, it won't work.
How to make one yourself
Well, there's a few things you could get advise, but let me say, it's easy, so don't panic.
  • First, you want to bind the 0 key to an alias.
    (bind "0" "modifier") in console or cfg.
  • Then you want to make use of that "modifier".
    (alias "modifier" "alternate1; "bind "1" "warmup" ").
  • Now you have a simple function, but it doesn't refresh and, it doesn't have anything. So i'm going to add something to the alias "warmup".
    (alias "warmup" "sv_cheats 1; sv_full_alltalk 1; mp_give_player_c4 0; mp_autokick 0; mp_ignore_round_win_conditions 1; say warmup activated").
  • That will modify some rules of the game, but it isn't done, because i want to reverse it with the alias i make named "alternate".
    (alias "alternate1" "alias "modifier" "alternate2"; bind "1" "slot1" ")
    (alias "alternate2" "alias "modifier" "alternate1"; bind "1" "warmup" ")
That'll make it, so you can reverse, and bring back the number 1 to the first slot when you press 0 again.

After pressing 1

What happens if i want more keys to be affected?

  • You will need to separate the "modifier" alias and the bind to 1.
    (alias "modifier" "alternate1; bind "1" "warmup"; bind "2" "bhop" ")
    (alias "bhop" "sv_cheats 1; sv_enablebunnyhopping 1; sv_autobunnyhopping 1; sv_staminamax 0; sv_staminajumpcost 0; say bhop activated")
  • That'll make the number 2 to be affected too, but you want to reverse it, so.
    (alias "alternate1" "alias "modifier" "alternate2"; bind "1" "slot1"; bind "2" "slot2" ")
    (alias "alternate2" "alias "modifier" "alternate1"; bind "1" "warmup"; bind "2" "bhop" ")
  • Well, that's everything about that, if you want to add more, just keep adding binds, i think it's very easy to see how it is.

    After pressing 2


    But, if i want to have another function while i press the key and not on the second time?

    • Well, you will need to use the + in the alias and the -.
      The "+" will trigger while the thing that is triggering it is active. And when it stops triggering, it actives the "-", so.
      (bind "0" "+modifier")
      (alias "+modifier" "bind "1" "player_ping")
      (alias "-modifier" "bind "1" "slot1")

      Screenshot, pressing 0 + 1
    • And that's it. It's very easy and you have a while press functionality.

    Please, if you have any question ask below. I'm not the smarter kid alive, but i think i can resolve some of the problems.
    If you want, rate my english. Because, i want to know how well my grammar is.
    Last thing, if you want to say that i'm wrong at something i said, don't hold back, let me know.
2 Comments
Cristina Magana 18 Feb, 2022 @ 7:39pm 
Like
kAT1 18 Feb, 2022 @ 4:48pm 
+rep