- nav:
- cs-nation home
- counter-strike info
- scripting
- +/- alias tutorial
+/- alias tutorial
Introduction
In this tutorial I'll explain how to make a +/- alias, and its various uses. I'm going to assume you've done the toggle alias tutorial. We'll use the net graph for this one too.
the basics.
Were going to take what we learned from the toggles, and make it so if we hold down n, it will show the net graph, and let go it will go away (like the scores screen). to do this we must take wat we had at the start:
alias ngon "net_graph 3; bind n ngoff"
alias ngoff "net_graph 0; bind n ngon"
bind n "ngon"
Now we don't need that bind in there (the in alias one), but we do need the net graph one, rename ngon to +ng, and ngoff to -ng, then delete those binds from it:
alias ngoff "net_graph 0; bind n ngon"
bind n "ngon"
alias +ng "net_graph 3"
alias -ng "net_graph 0"
bind n "+ng"
Thats it, its done, simple ain't it? the explanation of this is when you press the key bounds to the +alias, it executes all the commands you have after it, in this case it was just net_graph 3. And when you let go, it executes even more commands, which we had only net_graph 0. You could do many things with this, like make holding tab show your scores and your frames/sec, lets do that. Add +showscores after the net_graph 3 command, and -showscores after the net_graph 0 one, and bind it to "tab" instead of "n":
alias -ng "net_graph 0"
bind n "+ng"
alias +ng "net_graph 3; +showscores"
alias -ng "net_graph 0; -showscores"
bind tab "+ng"
And yes, the key you use for this can be configured via the in game menu (if you so choose to).
alias -ng "net_graph 0; -showscores"
bind tab "+ng"
-Corpo
