
A bind is something Counter-Strike or Half-Life uses to give an action to a key. It 'binds' the 'key' to the 'action'. Here is an example:
"SPACE" is the 'Key', this is the key we press to perform the action. "+jump" is the action performed when we press the key. 'bind' is the command we use to bind the key to the action, we need to put this infront of the key and action so that Counter-Strike knows what we are trying to do.
An 'alias' is something to make it simpler to use a group of commands, you simply put all the commands you want in the 'alias' and just call that one alias, making it much easier. Here is what an alias would look like with multiple commands:
If you look at the above alias, it is set out in much the same way as a bind - the 'alias' command infront of the whole thing, then the name of the alias followed by the actions or commands you want to be performed. Using aliases, you can bunch lots of commands into one alias, making it easier to call that alias, here is an example:
'buymp5' is the name of the alias, if we were to type 'buymp5' into console it would execute the commands in the second section of the alias. For this example, this would buy an MP5. If you notice, the commands are separated by a semi-colon and a space. The semi-colons tell Counter-Strike that there is a new command starting. You don't have to put a space after the semi-colon, some people don't, it's entirely up to you. I like to put spaces because it makes it easier to read if you have any problems with the alias. To bind a key to an alias it follows the same technique as in the 'What is a Bind?' section of this guide.
If, for example you wanted to buy an MP5, Full Ammo and Full Armour, you would have to write the aliases separately for each of them first, then collect them all in a new alias.
If you follow that through, the first three aliases set themselves up to buy an MP5, Ammo and Amrour respectively. The 4th alias buys them all together by calling all the original aliases and grouping them together, remember - they are separated by a semi-colon.
A script is a collection of binds and aliases that work together to form a package e.g. A 'Buy Script' would include lots of aliases and binds that would enable you to buy all the weapons available for example.
In Half-Life and Counter-Strike there are 2 main files that are used in scripting, these are the 'config.cfg' and 'autoexec.cfg'. You may have noticed these 2 files inside your Counter-Strike directory before, I am going to show you how to use them and what they do.
This is automatically created by the game, this is the file with all your setup controls in. If you load up CS --> Config. --> Controls then you will be met with a list of commands, and next to them what you want to press to execute that commands. All this information is kept inside the 'config.cfg' file along with all your preferences and settings. Here is an example of the 'config.cfg':
Only put your binds in here, aliases will go in a different file. To add binds to this file, read the second section 'What is a Bind' and simply copy the end result into this file.
You may need to create this file yourself. Do this by opening up a new .txt file and save it as a .cfg file e.g. for the filename when you save, put filename.cfg. this file is executed automatically after the config.cfg when you start to play. This is the file where you should put all your 'aliases' and command to execute other .cfg files.
Sometimes if you have downloaded, say a Buy Script for example, it won't come in the form of an 'autoexec.cfg' file. It will more likely come in it's own .cfg file. This makes it easier to search through your work, by putting separate things in separate files. For example, you could have all your Taunts/Comments in one file, and your Buy Script in another. These files will NOT be executed automatically by Half-Life/Counter-Strike, they will need to be executed by you. There are 2 ways to do this:
If you made it through all that, this should be easy. Here are some commands and useful information for you when you decide to start scripting, or are looking at any script examples:
Console - Where all commands are typed into, to use the console press the tilde key '~' underneath the 'ESC' key. If your console does not work, open up your 'config.cfg' and find the line that says 'console 0.00000' or something similar, and change the '0.00000' to '1'. Then, right click on your Counter-Strike Shortcut on your desktop, where it says 'Target' add onto the end -console. A scripting command to add on the end of this is '-zone 4096', this will allocate more memory for files used with Half-Life, I recommend adding this.
Menuselect # - This is a command used mainly in Buy Scripts. When you open your buy menu in Counter-Strike, you notice all the options with a number next to them, you use this command followed by the number of those menu's to access them automatically. So to open the First Menu, you would put 'menuselect 1'.
Wait - A command used to put a space between commands in an alias.
exec - The command used to execute other scripts, usage; 'exec filename.cfg'
Bind - Command used to bind a command to a key, read up for more information.
Alias - Used to make using multiple commands easier, read up for more information.
Slot # - Used to open up the chosen weapon slot, for example 'slot 1' would open up the pistol slot on the main HUD.
weapon_
Comments
02:14 19/12/2001
01:41 24/12/2001
21:44 4/1/2002
12:22 10/1/2002
20:15 10/1/2002
I'm glad this guide helped you, any feedback is appreciated ;D [ Comment: Report | IP: Logged ]
01:51 1/3/2002
19:05 13/6/2002
11:47 27/6/2002
22:54 15/7/2002
Thnx [ Comment: Report | IP: Logged ]
12:55 16/7/2002
14:44 20/8/2002
i'm became pro to scripting.
[-P-]*sephirot [ Comment: Report | IP: Logged ]
13:15 7/10/2002
20:19 8/10/2002
18:18 8/11/2002
...nitty-gritty... [ Comment: Report | IP: Logged ]
16:47 17/11/2002
---== Buy script loaded ==--- [ Comment: Report | IP: Logged ]
03:14 7/12/2002
19:52 7/12/2002
im lazy so ya... [ Comment: Report | IP: Logged ]
02:12 17/12/2002
13:25 22/12/2002
13:07 2/1/2003
18:06 22/1/2003
Thanks [ Comment: Report | IP: Logged ]
14:22 18/3/2003
05:39 26/3/2003
22:35 23/4/2003
to add a say command type
;say then what ever [ Comment: Report | IP: Logged ]
18:04 26/4/2003
14:05 6/5/2003
13:55 10/8/2003
09:37 9/11/2003
21:20 27/1/2004
now i can make my own
tnx dude [ Comment: Report | IP: Logged ]
18:23 11/2/2004
17:32 19/3/2004
07:10 20/3/2004