1. Click here to join our community discord server.

L4D2 edit Config.cfg shortcut commands instruction

Discussion in 'Introductions & Member Gallery' started by Cat_in_action, Mar 19, 2016.

  1. Cat_in_action

    Cat_in_action Junior Member

    Hey all. I couldn't find like this topic. I decided to write to make easier to other players.
    https://www.youtube.com/watch?v=16ArOtXDmKM

    I will show you how to edit config.cfg file in L4D2.
    L4D2 must be closed.
    You must have installed Notepad++
    https://notepad-plus-plus.org/download/v6.9.html

    1.Find config.cfg file in:
    C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\cfg

    2.Open it and setup new Shortcut key, make shure that you not setup two or more shortcuts on same button.

    I have add these Shortcut keys (in brackets is explain of shortcuts, don't write them in config.cfg file)

    bind "b" "say /buy" (!buy)
    bind "c" "say /cp" (!cp)
    bind "j" "say /cp; menuselect 1; menuselect 3" (Buffs)
    bind "k" "say /tankhp" (!tankhp)
    bind "l" "say /laseron" (!laseron)
    bind "F4" "say /buy; menuselect 1; menuselect 5; menuselect 2" (buy awp)
    bind "F5" "say /buy; menuselect 1; menuselect 2; menuselect 2" (buy ak47)
    bind "F6" "say /buy; menuselect 4; menuselect 2" (buy defibrillator)
    bind "F7" "say /buy; menuselect 4; menuselect 3" (buy full health)
    bind "F8" "say /buy; menuselect 4; menuselect 4" (buy Frst aid kit)
    bind "F9" "say /buy; menuselect 3; menuselect 1; menuselect 1" (buy molotov)
    bind "F10" "say /buy; menuselect 3; menuselect 1; menuselect 2" (buy pipe bomb)

    3.Save and close config.cfg file.

    4.Right click on config.cfg file and in Properties mark Read-only. Because L4D2 without mark will delete your shortcuts.

    5.Close it and enjoy.

    My config file, you could replace with your file.
    http://www.speedyshare.com/8S72s/Config.cfg.rar
     
  2. fnord

    fnord Game Server Moderator Staff Member

    Thanks Cat, good stuff! Here is another tip. If you do not want to mess with the cfg file, open l4d, open the console with '~' and type your binds with a semicolon between the commands. This will automatically save to your cfg file, see below for example. Although you do need to enter the bind F1 menuselect commands one by one in console.

    bind "v" "say /saveme"; bind "l" "say /players"; bind "p" "say /csm"; bind "o" "say /donor"; bind "w" "say /sm_who"; bind "q" "say /sm_admin"; bind "a" "say /laseron"; bind "f" "say /cp"; bind "g" "say /tankhp"; bind "p" "say /csm"; bind "r" "say /repeatbuy"; bind "s" "say /buy"
     
  3. XeroX

    XeroX Junior Member

    You dont need to use say to bind a command (i recommend it though for commands like !tankhp as they would otherwise reply in console). You can also just use sm_command. so for example: bind v sm_saveme or bind p sm_cp.

    This works for both ingame via console and via cfg file. This also works for commands with targets.

    bind . "sm_slap @aim 0" the quotations in this case are required otherwise it would just bind . to sm_slap which would not work as you need a target.
     
  4. Stefeman

    Stefeman Head Administrator Staff Member

  5. XeroX

    XeroX Junior Member

    As Full health has been removed from the !buy menu here the new updated numbers for pills medkit and defib.

    Pills
    Note: KP = Keypad in this case number 4
    Code:
    bind "KP_LEFTARROW" "sm_buy;menuselect 4;menuselect 4"
    Medkit
    Keypad 5
    Code:
    bind "KP_5" "sm_buy;menuselect 4;menuselect 3"
    Defib
    Keypad 6
    Code:
    bind "KP_RIGHTARROW" "sm_buy;menuselect 4;menuselect 2"