Advanced Binding of Keys

I know how to do simple binds. bind <key> <stuff to bind> etc etc.

I’m trying to create a cycle of tools so that I can select tools without going into the Q menu, this cannot be done with add-ons due to client side blocking things on the server I play on.

I have 2 buttons, Mouse 5 (Forward) Mouse 4 (Backward), when I push mouse5 I want it to move to the next tool in the cycle, and bring it out. When I push mouse4 I want it to go backwards to the last tool.

I know this has to be done with aliases some how but have no idea where to start seeing as there are no if statements D: I have a feeling this is not possible, so let me know if it isn’t, or give me some code or somewhere to begin if it is. Thanks.

You could try writing it in Lua.

Wouldn’t lua be a client-side addon, and just be blocked?

lua_autorun_cl command?

typing cl_quicktool 1 should enable a built-in shortcut bar