Saxton Hell Forums
General => General Discussion => Topic started by: Mr. Gamebito on July 06, 2012, 05:44:51 pm
-
I'm wondering three things:
1. Is it possible to make it so that you have to hit two keys in order for a script to start working (ex: Hitting left control and P)?
2. Is it possible to make a script where you can press a button and it switches scripts (ex: Hitting "i" once and saying /3, and hitting "i" again would make me say /1)?
3. How would you stop a looping script (ex: alias "poop" "+taunt; poop")?
If anyone knows how to do any of these, please post an example script below! <3
-
This shit is all untested so tell me if it works I guess. It's been a while since I've done scripting.
1. I think this will work
bind ctrl +ctrlp;
bind p myaction;
alias +ctrlp "alias myaction action";
alias -ctrlp "alias myaction nullaction";
2. Yeah this is possible. Extracted from one of my scripts to toggle netgraph
alias toggle_net_graph tng1
alias tng0 "net_graph 0; alias toggle_net_graph tng1"
alias tng1 "net_graph 3; alias toggle_net_graph tng0"
3. You can't anymore. You used to be able to do this using "wait" but Valve has disabled it permanantly I think. Even if they didn't, it's disabled on most servers since you can do some really terrible things with it.
-
2. Yeah this is possible. Extracted from one of my scripts to toggle netgraph
alias toggle_net_graph tng1
alias tng0 "net_graph 0; alias toggle_net_graph tng1"
alias tng1 "net_graph 3; alias toggle_net_graph tng0"
What does tng1 mean in the first line? >.< Actually, what does it mean in all the other lines (other than naming the alias)? :3
And what would I bind "o" to?
-
Okay. So I made a toggle script after learning about rebinding in scripts.
One for switching between first and third person on the servers:
alias 3rdon "echo ThirdPerson Enabled; say /3; bind o 1ston"
alias 1ston "echo FirstPerson Enabled; say /1; bind o 3rdon"
bind o 3rdon
And one for going through Buddha, God, and Mortal mode on the trade server:
alias buddha "echo Buddha On; say /buddha; bind p god"
alias god "echo God On; say /god; bind p mortal"
alias mortal "echo Mortal On; say /mortal; bind p buddha"
bind p buddha