
Hello, I am going to introduce you to + and - aliases. First of all, you will need to know what they are. If a + sign is placed infront of your alias, then everything said in that alias will happen when you press the button bound to that alias down. Another alias that has the same name, except with a - sign infront of it, will execute when you release the button bound to the original alias. Here is an example:
If we just look at the +jump bit, this means when you press the Space Bar, it will jump, but when you release the Space Bar, it will stop jumping. Here is how to create the alias.
Choose something you want to use the alias for, the example we will use for this tutorial is to buy the MP5. First we need to create the aliases, and as I said above, we need to make a + alias and a - alias. So here we are:
So whatever we put in the '+buymp5' alias, will execute upon keypress, and anything in the '-buymp5' will execute upon release. So, now we need to add the command to buy the MP5.
So, when we press the button assigned to this alias, it will buy the MP5, but will not do anything else. So, we need to give it something to do upon key release. For this example we will echo 'MP5 Weapon Bought!' to the screen. Remember to turn developer on and off, before and after the command. We do this by adding this into the alias;
So the whole alias becomes:
So there it is! All we need to do now is to setup a bind for this alias, we would do this by putting the following in your 'config.cfg':
Remember, we don't need to bind a key to '-buymp5' as this will be executed when we release the key bound to +buymp5.
If you would like to use this code, just copy and paste this into the correct files, see the Introductory tutorial to find out which.
I hope you enjoyed the tutorial!
Comments
23:40 4/1/2002
you could set the +/- aliases so that when you click mouse 1 it will shoot and when you release it it will also shoot !!!! this would be handy when using the glock twice the firing speed heheh just a thot if you cud do that your shud post it on your site!!!!
14:27 5/1/2002
alias +weappr "+attack; wait; -attack; wait"
alias -weappr "+attack; wait; -attack"
bind "?" "+weappr"
That should fire your currently selected weapon upon keypress, and again when released.
Hope it helps... [ Comment: Report | IP: Logged ]
21:27 14/1/2002
20:38 19/2/2002
09:45 21/5/2002
pagus_85@hotmail.com
or
148573202 on ICQ [ Comment: Report | IP: Logged ]
09:46 21/5/2002
<a href="mailto
00:17 7/7/2002
please e-mail me i would have fun with it. see you later maybe [ Comment: Report | IP: Logged ]
23:44 25/9/2002
Read this (which aint even an intro to scripting) and it clicked straight away!
Thx dood! [ Comment: Report | IP: Logged ]
20:02 16/1/2003
²°°³ =××x |3 0 |2 || - T0 - @ // P x××= ²°°³ [ Comment: Report | IP: Logged ]
06:50 9/5/2003
alias +buymp5 "buy; menuselect 3; menuselect 1"
alias -buymp5 "buy; menuselect 6"
bind "?" "+buymp5" [ Comment: Report | IP: Logged ]
14:21 1/7/2003
You leave the buymenu open.
Try this:
alias "ms1" "menuselect 1"
alias "ms3" "menuselect 3"
alias "ms6" "menuselect 6"
alias "d1" "developer 1"
alias "d0" "developer 0"
bind ? "+buymp5"
alias "+buymp5" "buy;ms3;ms1;buy;ms6"
alias "slot10;d1; echo mp5 bought !;d 0;slot10"
Or another that i find generally better:
alias "b-mp5" "buy;ms3;ms1;buy;ms6;wait;d1;echo mp5 bought !;d0t;wait;wait;slot10;wait;wait;slot10;slot10"
bind ? "b-mp5"
I personally use the last one :-) [ Comment: Report | IP: Logged ]