Follow this and be amazed at the powers of customizations to TF2. Please keep Bumped for future reference.
1. Finding the correct Steam game folder.
a. Double click your Computer. b. Double click the drive you have Steam installed on. (If you don't know what I'm talking about, hit the C drive.) c. Double click the "Program Files" folder. d. Scroll down until you find the "Steam" folder (if you named it something else, I pity you) and double click it. e. Double click the "steamapps" folder. f. Double click on the folder with your username. g. Find the folder for the game you want to add scripts on and double click it.
2. Adding autoexec.cfg.
a. Double click the folder that is an abbreviation of your game. For example, Team Fortress 2 will have the folder "tf". b. Double click on the "cfg" folder. If you don't see a cfg folder, go back to the last folder, and click on a different folder until you find it. c. Double click the CFG file named "config". If you don't see one, you are not in the correct folder. d. It should ask you how to open up this type of file. Assign it to Windows Notepad, and check the box saying that it is the default program. e. The file should open and list commands for that Steam game, not separated by spaces. If you see this, close the file. f. Right click "config.cfg" and scroll down to "Copy". g. Right click in the "cfg" folder and hit "Paste". It should be named "config - Copy" or some variation of the like. h. Rename the copied file "autoexec". i. Open "autoexec", delete all the text inside it, and save it.
3. Adding scripts.
a. Find the script you want. (This can be from any site, this one is preferred) b. Copy the script text. The author should separate it from actual text. c. Paste that script text inside "autoexec". d. Save the file.
The next time you open up that Steam game, your script should load automatically. If you want to load it up manually, follow these instructions.
4. Manually Executing "autoexec.cfg"
a. Open up your Steam game. b. Go into "Options" c. Go to the "Keyboard" tab. d. Click the "Advanced" button at the bottom of the window. e. Check the "Enable console (~)" box. f. Exit Options. h. Hit the ~ key. (It should be on the upper left.) The console should open up. i. In the new console box, type in "exec autoexec.cfg" --- GT: Xyres Sometimes I REALLY doubt the intelligence of the GFAQ moderators. >.>
Open Notepad. Type "exec config.cfg". Save a copy of this file in C:\Program Files\Steam\steamapps\team fortress 2\tf\cfg: scout.cfg, soldier.cfg, pyro.cfg, demoman.cfg, heavyweapons.cfg, engineer.cfg, medic.cfg, sniper.cfg, spy.cfg, autoexec.cfg.
2. Adding your scripts.
To have a script execute automatically, open autoexec.cfg and add the script to the bottom of the file. To execute a script when you switch to a certain class, open the file with that class's name and add the script to the bottom.
If you want to disable a script from running, but don't want to delete it from the file, add // to the beginning of every line of the script. This makes that line a comment, and it will not be read by the Source engine.
You can also save a script in its own .cfg file in the /cfg/ folder, and execute it in a script with the line "exec scriptname.cfg" or execute it manually in the console (Options > Keyboard > Advanced > check Enable developer console) with the same format. --- L.A.W.