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.












Comments »

Streetbum @ 2007-08-21 15:54:06
How would I bind, speech. I bind all my bind ";" "rcon kick Greenblaster" all the time, but how would I bind like:

bind "KP_UPARROW" "It takes [1][2][3][4][5] Pokemon to battle!!"
or
bind "KP_LEFTARROW" "TMP POWER"
bind "KP_5" "Sometimes rabid sea turtles kill people... not often"

Yes, I plan on binding my whole numpad with random crap I always say :):) Very useful blog, by the way.

Evil-Fluffy @ 2007-08-24 21:16:17
well this is actually something I wanted to use as an example for my next post...But here it is:

You basically have a couple of options. Saying to everyone, saying to team, saying as an admin (if you have it) and echoing stuff to the console (unseen by others)

It really easy, just type in the command string (the second part between the "") either say (for saying to all), say_team (for saying to your team), say @ or ma_say (to use admin say, only if you have admin on that server), ma_csay (to use console saying, only if you have rcon or echo (to echo stuff to the console, for instance when you're switching configs, etc.

Some examples (from my configs):

bind ";" "say please don't talk so much, it's annoying."

bind "/" "say_team RUSH A!!!"

bind "h" "ma_say No swearing please!"

bind "g" "ma_csay KNIFE ROUND BEGINNING" (don't know exactly which access you should have, eiter just mani, or mani and rcon)

echo "autoexec cfg loaded"

If you have additional question, don't hesitate to ask.

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