How to bind keys.

Most scripts work by pressing a certain key to execute them. So, you need to know how to bind a script to a key. To do this, you insert a line like this:

bind <key> <action>

For example, bind K kill. This line in your config file will make it so you can press "K" to commit suicide. Or, bind M vsay Cheer, that will make you cheer every time you press M.

Here is a list of things you can put for <key>:

  • Alphabet: A-Z
  • Numbers: 0-9
  • Function keys: F1-F12
  • Punctuation: -[]/\'.,;~=
  • SPACE, TAB, SHIFT, CTRL, ALT, ENTER, BACKSPACE
  • PAUSE
  • Arrow keys: UPARROW, DOWNARROW, LEFTARROW, RIGHTARROW
  • INS, HOME, PGUP, DEL, END, PGDN
  • Numeric keypad: KP_HOME, KP_SLASH, *, KP_MINUS, KP_UPARROW,
                    KP_DOWNARROW, KP_LEFTARROW, KP_RIGHTARROW,
                    KP_PGUP, KP_5, KP_PLUS, KP_ENTER, KP_END,
                    KP_PGDN, KP_INS, KP_DEL
  • Left mouse button: MOUSE1
  • Right mouse button: MOUSE2
  • Middle mouse button: MOUSE3
  • More mouse buttons: MOUSE4/MOUSE5 (some mice have extra buttons)
  • Mousewheel scroll up: MWHEELUP
  • Mousewheel scroll down: MWHEELDOWN

As for <action>, it is basically any valid command. So far you know 2 commands: kill and vsay.

Quickchat hotkeys ("vsays")

You can assign keys to quickchat commands, which can be useful if you want to be able to just tap a key to say "thanks" or "sorry" and things like that. You can do it like this:

bind M "vsay GoodGame"

This lets you say "Good game" by pressing M. Note, if you want to say the message to your own team only, then use vsay_team instead of vsay.

Here is a list of all the things you can use with vsay:

NOTE: some of these might be leftovers from RTCW

EnemyDisguised: "Enemy in disguise!"
PathCleared: "Path cleared."
EnemyWeak: "The enemy is weakened."
AllClear: "All clear."
Incoming: "Incoming!"
FireInTheHole: "Fire in the hole!"
OnDefense: "I'm on defense."
OnOffense: "I'm attacking."
TakingFire: "Taking fire!"
MinesCleared: "Mines cleared."
NeedBackup: "I need backup!"
CoverMe: "Cover me!"
NeedEngineer: "We need an engineer!"
NeedOps: "We need Covert Ops!"
Medic: "Medic!"
NeedAmmo: "I need ammo!"
NeedTarget: "I need a target!"
WhereTo: "Where to?"
FollowMe: "Follow me!"
LetsGo: "Let's go!"
Move: "Move!"
ClearPath: "Clear the path!"
HoldFire: "Hold fire!"
DefendObjective: "Defend our objective!"
DisarmDynamite: "Disarm the dynamite!"
ClearMines: "Clear the mines!"
ReinforceDefense: "Reinforce the defense!"
ReinforceOffense: "Reinforce the offense!"
DestroyPrimary: "Destroy the primary objective!"
DestroySecondary: "Destroy the secondary objective!"
DestroyConstruction: "Destroy the construction!"
ObjectiveDestroyed: "Objective destroyed!"
RepairVehicle: "Repair the vehicle!"
DestroyVehicle: "Destroy the vehicle!"
EscortVehicle: "Escort the vehicle!"
FireOnTarget: "Fire on my target!"
CommandAcknowledged: "Command acknowledged!"
CommandDeclined: "Command declined!"
CommandCompleted: "Command completed!"
ConstructionCommencing: "Construction underway!"
ConstructionCompleted: "Construction completed!"
ConstructionDestroyed: "Construction destroyed!"
ObjectiveFailed: "Objective failed!"

ObjectiveCompleted: "Objective completed!"
Affirmative: "Yes!"
Negative: "No!"
Thanks: "Thanks a lot!"
Welcome: "You're welcome."
Oops: "Oops!"
Sorry: "Sorry!"
Hi: "Hi!"
Bye: "Bye."
Cheer: "Yeah!"
GreatShot: "Great shot!"
GoodGame: "Good game!"
IamSoldier: "I'm a soldier."
IamMedic: "I'm a medic."
IamEngineer: "I'm an engineer."
IamFieldOps: "I'm a field ops."
IamCovertOps: "I'm a covert ops."
FTMeetWaypoint: "Meet at waypoint!"
FTAttackWaypoint: "Attack waypoint!"
FTchecklandmines: "Check for landmines!"
FTDefendWaypoint: "Defend waypoint"
FTAttack: "Attack!"
FTFallBack: "Fall back!"
FTCheckLandMines: "Check for landmines!"
FTCoverMe: "Cover me!"
FTCoveringFire: "Soldier, covering fire!"
FTMortar: "Deploy mortar!"
FTHealSquad: "Heal the squad!"
FTHealMe: "Heal me!"
FTReviveTeamMate: "Revive team mate!"
FTReviveMe: "Revive me!"
FTDestroyObjective: "Destroy objective!"
FTRepairObjective: "Repair objective!"
FTConstructObjective: "Construct the objective!"
FTDisarmDynamite: "Disarm the dynamite!"
FTDeployLandmines: "Deploy landmines!"
FTDisarmLandmines: "Disarm landmines!"
FTCallAirStrike: "Call airstrike!"
FTCallArtillery: "Call artillery!"
FTMortarBarrage: "Call mortar barrage!"
FTResupplySquad: "Resupply squad!"
FTResupplyMe: "Resupply me!"
FTExploreArea: "Explore area!"
FTExploreAtCoordinates: "Explore at co-ordinates!"
FTSatchelObjective: "Destroy satchel objective!"
FTInfiltrate: "Infiltrate!"
FTGoUndercover: "Go undercover!"
FTProvideSniperCover: "Provide sniper cover!"

Double binding.

You can change the text that gets displayed for vsays. For example, the default text for NeedEngineer is "We need an engineer!". You can change the text though, for example, "We need a ninja deer!".

How to double bind on an etpro server

It's very simple, just add the replacement text after the command, as shown below.

bind K "vsay_team NeedEngineer We need a ninja deer!!!"
bind K "vsay_team EnemyDisguised Enemy in the skies!"

How to double bind on an etmain/shrub server

There is a workaround, but it's a bit complicated. Here is the script I made up, I haven't tested it much so you might have to tweak it to get it to work properly:

set EnemyDisguisedSay "say Enemy in the skies!"
set db_1 "cg_novoicetext 1; vsay EnemyDisguised; vstr EnemyDisguisedSay"
set db_2 "cg_novoicetext 0"
bind K "+vstr db_1 db_2"

The cvar, cg_novoicetext lets you turn off the default text that gets shown for a vsay, that's all... By the way, if you ever want to turn off the SOUND for voice chats, just do "cg_novoicechats 1".

Text message hotkeys.

You can assign keys to text messages. I really really recommend doing this for common messages that you may need to say to your team, like, "Don't go out the fucking backdoor!" To do this, you do:

bind "K" "say_team DO NOT go out the fucking backdoor!"

As you can guess, say_team puts the message in team chat, and say is for public chat.

Unfortunately the say and say_team commands have a little bug. They don't do capital letters. So the message above will show up as "do not go out the fucking backdoor!". If you want your messages to show up with capital letters, there's a workaround you can use:

set BackDoorMessage "say_team DO NOT go out the fucking backdoor!"
bind "K" vstr BackDoorMessage.