How to bind several items to one key?

For example, bind Q to both molotov/incendiary grenade and HE-grenade (in other words, toggle between molotov/incendiary grenade and HE-grenade with Q).
I know that alias has to be used.


Solution 1:

If you want a toggle between two items (or settings) you can do it this way:

bind q usethis
alias usethis "use weapon_hegrenade; bind q usethat"
alias usethat "use weapon_molotov; use weapon_incgrenade; bind q usethis"

Whenever you press Q you'll change between HE and Molotov/Incendiary. If you switch to something else in between the script remembers the last item of those two you previously switched to. Also if you manage to hold both, Molotov and Incendiary, the script prefers the Incendiary over the Molotov.