SpawnPoint

My Blog

binding keys

Today I'm gonna be talking about the bread and butter of your soon to be config files... Key binds.

Key binds are used for just about everything you can do in the game, from moving around to attacking, buying weapons and even saying custom made lines ( If you have to say something a lot of times).

First let's look at how the bind is build up. Here's a sample line:

bind "q" "buy deagle;"

What this line does is it binds key q to buying a deagle. So at the start of a round when you press q it buys you a deagle pistol. Pretty handy eh. It does exactly the same as opening your buy menu, selecting pistols and selecting the desert eagle, only instead of using three actions you just press one button.

Ofcourse you can substitute the letter q for any of your keys on the keyboard. Letters and numbers are just the actual characters. The more special ones are for instance the keypad keys and the special keys like the F1-F12 the shift, command, enter and so on.

Here's a small list most of the special keys:

Special keys on the keyboard:
"TAB"
"ENTER"
"ESCAPE"
"SPACE"
"BACKSPACE"
"SHIFT"

Special Keys above cursor keys:
"PAUSE"
"ALT"
"INS"
"DEL"
"PGUP"
"PGDOWN"

Cursor Keys:
"UPARROW"
"DOWNARROW"
"LEFTARROW"
"RIGHTARROW"

Keypad Keys:
"KP_SLASH"
"KP_MINUS"
"KP_HOME"
"KP_UPARROW"
"KP_PGUP"
"KP_LEFTARROW"
"KP_5"
"KP_RIGHTARROW"
"KP_PLUS"
"KP_END"
"KP_DOWNARROW"
"KP_PGDOWN"
"KP_ENTER"
"KP_0"
"KP_DEL"

F Keys:
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"F11"
"F12"


The space between the second quotes is where the commands will be placed that should be executed when you press the button. In the example above this is just buying a deagle but it can be used for a lot more. Next time I'll be talking more about that.












What is the config, and what does it do?

Why would you want to create your own custom configs?

If you set your keys, your spray, your name, or change any setting in the menu the settings are automatically written to a file called config.cfg. You can find this file in this folder:  (directory where you installed steam to)\Valve\SteamApps\(your_player_name_here)\counter-strike source\cstrike\cfg

If you open your config.cfg file with notepad you'll see it contains a lot of settings. Most settings aren't worth messing about right now. We'll get to that in a later post.

The config.cfg file is a file that is automatically created when it is damaged or removed. What this means is that with every update you could lose all your carefully set keys and video settings. It happened to me twice, which caused me to do some research into the config scripts.

Before we can start creating our own custom configs, we first want to create a text file called autoexec.cfg in the same directory the config.cfg is located.This file is automatically loaded when you launch Counterstrike:Source, and since this isn't a file create by steam, anything you put in here is safe from the next updates...

Next time I'll discuss some of the basics in scripting.... see you then!


Introduction

I'm not quite sure how to start...So here it is:

For those of you that don't know me. I'm Evil_fluffy, I'm 26 years old (nearly 27). In daily life I'm a game programmer mostly working on serious games. I live in the Netherlands (for those in the US...it's a small blip on the map on the other side of the puddle in Europe).

In the evenings, nights and sometimes mornings I like to play CSS. On the spawnpoint servers I can mostly be found on London Gungame or DustFest 24/7 #1 (on which I recently became an admin).

I've been playing cs since the early days (probably one of the beta versions, think it was 0.5 or 0.7). In the beginning I could only play at school with my classmates, those were the good old days. It really sparked a passion for playing multiplayer first person shooters. Played the original cs till version 1.0 (when the update messed up the players animations). I then took a break for a while. When css came out, and I finally had broadband at home I started playing that.

I came across a nice bunch of guys on a server called newnet. Together we formed B.o.D. (Badgers of Doom). When newnet died, we went over to it's successor, zoig. After that we moved over to here. And have been playing here ever since.

Well that's a bit about me. I'm gonna ponder about what to write next time. Check you later!

Evil-Fluffy's Profile Image
  • Evil-Fluffy

    Server Support Staff
  • Member Since:2007-01-26 03:52:00
  • Last Online:2008-06-28 20:53:06

SpawnPoint Info

Blog Stats:

  • Total Blogs: 4
  • Popular Blogs: 2

My Games

SpawnPoint: Game File Community featuring PC Video Gaming, Free PC Games, Counter-Strike, Action And Strategy Files, Game Forums and Game News