Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Come and join our gamer community by
registering for free here
First Person Shooters & Third Person Shooters
Counterstrike CZ/CS/CSS/GO Forum
How to make a CS: Source Buy Script
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Ind3lible" data-source="post: 129937" data-attributes="member: 7530"><p>=-=-=-=-=</p><p>* Setup *</p><p>=-=-=-=-=</p><p>First, we'll need to make an autoexec for your buy scripts to go in.</p><p></p><p>Open up the C:\Valve\Steam\SteamApps\youremail\counter-strike source\cstrike\cfg folder</p><p>Right-click anywhere in the folder, from the pop-up menu go to New >>> Text Document</p><p>*** I recommend using Notepad for editing / creating config files to prevent any possible problems ***</p><p></p><p>Open up the New Text Document and go to File >>> Save As</p><p></p><p>For the File name: "autoexec.cfg"</p><p>For the Save as type: All Files</p><p>For the Encoding: ANSI</p><p>Once it's saved it will create a new document called autoexec.cfg, this is where you will enter in your commands.</p><p></p><p></p><p>=-=-=-=-=-=-=-=-=-=-=</p><p>* Entering Commands *</p><p>=-=-=-=-=-=-=-=-=-=-=</p><p>Buy Scripting in Source is very similar to 1.6/CZ except that you need to add "buy" before whichever weapon or item you are going to purchase. Other than that, it's pretty much the same, so here we go.</p><p></p><p>First type which key that you want to bind (for this example we will use f1)...</p><p></p><p>bind f1</p><p>Now, decide which weapon you would like f1 to buy, we'll use the AK-47:</p><p></p><p>bind f1 "buy ak47"</p><p>And that's it...of course there's more things you can add such as buying Primary Ammo, Kevlar, Grenades, etc. So we'll do one so that we buy an AK-47, Primary Ammo, Kevlar, and a HE grenade:</p><p></p><p>bind f1 "buy ak47; buy primammo; buy vest; buy hegrenade"</p><p>You can also combine 2 different team specific weapons into the same binds. Like the AK-47 and M4A1:</p><p></p><p>bind f1 "buy ak47; buy m4a1; buy primammo; buy vest; buy hegrenade"</p><p>That's all there is to it...of course you'll need to know the names of what weapons you want to buy in order to put them in your script...</p><p></p><p></p><p>=-=-=-=-=-=-=-=-=-=-=-=</p><p>* Weapon Bind Names *</p><p>=-=-=-=-=-=-=-=-=-=-=-=</p><p>Here is the list of the weapons and equipment you can buy and their proper bind name...also note that these are the real weapon names and not the fake VGUI weapon names just in case you're wondering why they're listed differently here.</p><p>Pistols:</p><p>Glock G18 Select Fire - glock</p><p>HK USP .45 Tactical - usp</p><p>Sig P228 - p228</p><p>Desert Eagle - deagle</p><p>FN Five-seveN - fiveseven</p><p>Dual Beretta 96G Elite - elite</p><p>Shotguns:</p><p>Benelli M3 Super90 - m3</p><p>Benelli XM1014 - xm1014</p><p>Submachine Guns:</p><p>Steyr Tactical Machine Pistol - tmp</p><p>Ingram MAC-10 - mac10</p><p>HK MP5-Navy - mp5navy</p><p>HK UMP45 - ump45</p><p>FN P90 - p90</p><p>Assault Rifles:</p><p>IMI Galil - galil</p><p>FA MAS - famas</p><p>AK-47 - ak47</p><p>Colt M4A1 Carbine - m4a1</p><p>Sig SG 552 Commando - sg552</p><p>Steyr AUG - aug</p><p>Sniper Rifles:</p><p>Steyr Scout - scout</p><p>Sig SG 550 Sniper - sg550</p><p>AI Arctic Warfare/Magnum - awp</p><p>HK G3/SG-1 Sniper Rifle - g3sg1</p><p>Machine Gun:</p><p>FN M249 Para - m249</p><p>Ammunition:</p><p>Primary Ammo - primammo</p><p>Secondary Ammo - secammo</p><p>Equipment:</p><p>Kevlar Vest - vest</p><p>Kevlar Vest & Helmet - vesthelm</p><p>Flashbang - flashbang</p><p>HE Grenade - hegrenade</p><p>Smoke Grenade - smokegrenade</p><p>Defuse Kit - defuser</p><p>NightVision Goggles - nvgs</p><p>=-=-=-=-=-=-=-=-=-=</p><p>* Key Bind Names *</p><p>=-=-=-=-=-=-=-=-=-=</p><p>Here is the list of the keyboard keys you can bind and their proper bind name...also note that these are from 1.6 but I don't think that they've been changed in CS:S.</p><p>Keyboard Key - Key Bind Name</p><p>Space Bar - space</p><p>Caps Lock - capslock</p><p>Escape - escape</p><p>F1 - f1</p><p>F2 - f2</p><p>F3 - f3</p><p>F4 - f4</p><p>F5 - f5</p><p>F6 - f6</p><p>F7 - f7</p><p>F8 - f8</p><p>F9 - f9</p><p>F10 - f10</p><p>F11 - f11</p><p>F12 - f12</p><p>Pause - pause</p><p>Left Quote - `</p><p>Hyphen - -</p><p>Equals Sign - =</p><p>Backspace - backspace</p><p>Tab Key - tab</p><p>Left Bracket - ]</p><p>Right Bracket - [</p><p>Forward Slash - \</p><p>Semicolon - semicolon</p><p>Right Quote - '</p><p>Back Slash - /</p><p>Shift Key - shift</p><p>Enter - enter</p><p>Comma - ,</p><p>Control - ctrl</p><p>Alt - alt</p><p>One - 1</p><p>Two - 2</p><p>Three - 3</p><p>Four - 4</p><p>Five - 5</p><p>Six - 6</p><p>Seven - 7</p><p>Eight - 8</p><p>Nine - 9</p><p>Zero - 0</p><p>A - a</p><p>B - b</p><p>C - c</p><p>D - d</p><p>E - e</p><p>F - f</p><p>G - g</p><p>H - h</p><p>I - i</p><p>J - j</p><p>K - k</p><p>L - l</p><p>M - m</p><p>N - n</p><p>O - o</p><p>P - p</p><p>Q - q</p><p>R - r</p><p>S - s</p><p>T - t</p><p>U - u</p><p>V - v</p><p>W - w</p><p>X - x</p><p>Y - y</p><p>Z - z</p><p>Up Arrow - uparrow</p><p>Down Arrow - downarrow</p><p>Right Arrow - rightarrow</p><p>Left Arrow - leftarrow</p><p>Insert - ins</p><p>Home - home</p><p>Page Up - pgup</p><p>Page Down - pgdown</p><p>Delete - del</p><p>End - end</p><p>Mouse Button 1 - mouse1</p><p>Mouse Button 2 - mouse2</p><p>Mouse Button 3 - mouse3</p><p>Mouse Button 4 - mouse4</p><p>Mouse Button 5 - mouse5</p><p>Mouse Wheel Up - mwheelup</p><p>Mouse Wheel Down - mwheeldown</p><p>Keypad Key - Key Bind Name</p><p>1 - kp_end</p><p>2 - kp_downarrow</p><p>3 - kp_pgdn</p><p>4 - kp_leftarrow</p><p>5 - kp_5</p><p>6 - kp_rightarrow</p><p>7 - kp_home</p><p>8 - kp_uparrow</p><p>9 - kp_pgup</p><p>0 - kp_ins</p><p>+ - kp_plus </p><p>- - kp_minus</p><p>/ - kp_slash</p><p>. - kp_del</p><p>* - *</p><p>Enter - kp_enter</p><p>=-=-=-=-=-=-=-=-=-=</p><p>* Important Notes *</p><p>=-=-=-=-=-=-=-=-=-=</p><p>This is just some stuff to think about if you're having problems or are wondering about anything.</p><p></p><p>Don't use uppercase letters for the keys or else your scripts may not function properly.</p><p>If your scripts don't seem to be working, first make sure that you've setup your autoexec properly, then check spelling, and then format. Most errors are caused by misspelling.</p><p>If you don't have enough money to buy all the items, the game will buy in the order that you have the weapons/equipment listed in your script.</p><p>If you just want to buy single clips of ammo use either buyammo1 for primary ammo, or buyammo2 for secondary ammo, very useful for if you just want to buy one or two magazines of AWP or Shotgun ammo.</p><p>You can bind a key to use a certain weapon if you would like, which is very helpful with grenades, the following is an example: bind mouse4 "use weapon_hegrenade"</p><p>You can also add text headers in your autoexec in order to keep different types of binds separated and labeled. Just add "//" to the beginning to make sure that the game doesn't try to read it as a command. The following is an example of what my autoexec looks like, so if you need more examples of buy script set up look here:</p><p>//Walk Toggle Script</p><p>alias walk "+speed; bind q run"</p><p>alias run "-speed; bind q walk"</p><p>bind q "walk"</p><p></p><p>//Net_Graph Script</p><p>alias +netgraph "net_graph 3"</p><p>alias - netgraph "net_graph 0"</p><p>bind alt "+netgraph"</p><p></p><p>//Buy Scripts</p><p>bind kp_home "buy p228; buy vest; buyammo2; buyammo2"</p><p>bind kp_uparrow "buy m3; buy vest; buyammo1; buyammo1"</p><p>bind kp_pgup "buy p90; buy vest; buy primammo"</p><p>bind kp_leftarrow "buy galil; buy famas; buy vest; buy primammo"</p><p>bind kp_5 "buy ak47; buy m4a1; buy vest; buy primammo"</p><p>bind kp_rightarrow "buy sg552; buy aug; buy vest; buy primammo"</p><p>bind kp_end "buy hegrenade; buy flashbang"</p><p>bind kp_downarrow "buy primammo; buy secammo"</p><p>bind kp_pgdn "buy vesthelm; buy vest"</p><p></p><p>//Game Configs</p><p>cl_showfps 1</p><p>hud_drawhistory_time 1</p><p>hud_deathnotice_time 3</p><p>hud_saytext_time 5</p><p>cl_smooth 0</p><p>cl_ragdoll_collide 1</p><p>bind mouse4 "use weapon_flashbang"</p><p>bind mouse5 "use weapon_hegrenade"</p></blockquote><p></p>
[QUOTE="Ind3lible, post: 129937, member: 7530"] =-=-=-=-= * Setup * =-=-=-=-= First, we'll need to make an autoexec for your buy scripts to go in. Open up the C:\Valve\Steam\SteamApps\youremail\counter-strike source\cstrike\cfg folder Right-click anywhere in the folder, from the pop-up menu go to New >>> Text Document *** I recommend using Notepad for editing / creating config files to prevent any possible problems *** Open up the New Text Document and go to File >>> Save As For the File name: "autoexec.cfg" For the Save as type: All Files For the Encoding: ANSI Once it's saved it will create a new document called autoexec.cfg, this is where you will enter in your commands. =-=-=-=-=-=-=-=-=-=-= * Entering Commands * =-=-=-=-=-=-=-=-=-=-= Buy Scripting in Source is very similar to 1.6/CZ except that you need to add "buy" before whichever weapon or item you are going to purchase. Other than that, it's pretty much the same, so here we go. First type which key that you want to bind (for this example we will use f1)... bind f1 Now, decide which weapon you would like f1 to buy, we'll use the AK-47: bind f1 "buy ak47" And that's it...of course there's more things you can add such as buying Primary Ammo, Kevlar, Grenades, etc. So we'll do one so that we buy an AK-47, Primary Ammo, Kevlar, and a HE grenade: bind f1 "buy ak47; buy primammo; buy vest; buy hegrenade" You can also combine 2 different team specific weapons into the same binds. Like the AK-47 and M4A1: bind f1 "buy ak47; buy m4a1; buy primammo; buy vest; buy hegrenade" That's all there is to it...of course you'll need to know the names of what weapons you want to buy in order to put them in your script... =-=-=-=-=-=-=-=-=-=-=-= * Weapon Bind Names * =-=-=-=-=-=-=-=-=-=-=-= Here is the list of the weapons and equipment you can buy and their proper bind name...also note that these are the real weapon names and not the fake VGUI weapon names just in case you're wondering why they're listed differently here. Pistols: Glock G18 Select Fire - glock HK USP .45 Tactical - usp Sig P228 - p228 Desert Eagle - deagle FN Five-seveN - fiveseven Dual Beretta 96G Elite - elite Shotguns: Benelli M3 Super90 - m3 Benelli XM1014 - xm1014 Submachine Guns: Steyr Tactical Machine Pistol - tmp Ingram MAC-10 - mac10 HK MP5-Navy - mp5navy HK UMP45 - ump45 FN P90 - p90 Assault Rifles: IMI Galil - galil FA MAS - famas AK-47 - ak47 Colt M4A1 Carbine - m4a1 Sig SG 552 Commando - sg552 Steyr AUG - aug Sniper Rifles: Steyr Scout - scout Sig SG 550 Sniper - sg550 AI Arctic Warfare/Magnum - awp HK G3/SG-1 Sniper Rifle - g3sg1 Machine Gun: FN M249 Para - m249 Ammunition: Primary Ammo - primammo Secondary Ammo - secammo Equipment: Kevlar Vest - vest Kevlar Vest & Helmet - vesthelm Flashbang - flashbang HE Grenade - hegrenade Smoke Grenade - smokegrenade Defuse Kit - defuser NightVision Goggles - nvgs =-=-=-=-=-=-=-=-=-= * Key Bind Names * =-=-=-=-=-=-=-=-=-= Here is the list of the keyboard keys you can bind and their proper bind name...also note that these are from 1.6 but I don't think that they've been changed in CS:S. Keyboard Key - Key Bind Name Space Bar - space Caps Lock - capslock Escape - escape F1 - f1 F2 - f2 F3 - f3 F4 - f4 F5 - f5 F6 - f6 F7 - f7 F8 - f8 F9 - f9 F10 - f10 F11 - f11 F12 - f12 Pause - pause Left Quote - ` Hyphen - - Equals Sign - = Backspace - backspace Tab Key - tab Left Bracket - ] Right Bracket - [ Forward Slash - \ Semicolon - semicolon Right Quote - ' Back Slash - / Shift Key - shift Enter - enter Comma - , Control - ctrl Alt - alt One - 1 Two - 2 Three - 3 Four - 4 Five - 5 Six - 6 Seven - 7 Eight - 8 Nine - 9 Zero - 0 A - a B - b C - c D - d E - e F - f G - g H - h I - i J - j K - k L - l M - m N - n O - o P - p Q - q R - r S - s T - t U - u V - v W - w X - x Y - y Z - z Up Arrow - uparrow Down Arrow - downarrow Right Arrow - rightarrow Left Arrow - leftarrow Insert - ins Home - home Page Up - pgup Page Down - pgdown Delete - del End - end Mouse Button 1 - mouse1 Mouse Button 2 - mouse2 Mouse Button 3 - mouse3 Mouse Button 4 - mouse4 Mouse Button 5 - mouse5 Mouse Wheel Up - mwheelup Mouse Wheel Down - mwheeldown Keypad Key - Key Bind Name 1 - kp_end 2 - kp_downarrow 3 - kp_pgdn 4 - kp_leftarrow 5 - kp_5 6 - kp_rightarrow 7 - kp_home 8 - kp_uparrow 9 - kp_pgup 0 - kp_ins + - kp_plus - - kp_minus / - kp_slash . - kp_del * - * Enter - kp_enter =-=-=-=-=-=-=-=-=-= * Important Notes * =-=-=-=-=-=-=-=-=-= This is just some stuff to think about if you're having problems or are wondering about anything. Don't use uppercase letters for the keys or else your scripts may not function properly. If your scripts don't seem to be working, first make sure that you've setup your autoexec properly, then check spelling, and then format. Most errors are caused by misspelling. If you don't have enough money to buy all the items, the game will buy in the order that you have the weapons/equipment listed in your script. If you just want to buy single clips of ammo use either buyammo1 for primary ammo, or buyammo2 for secondary ammo, very useful for if you just want to buy one or two magazines of AWP or Shotgun ammo. You can bind a key to use a certain weapon if you would like, which is very helpful with grenades, the following is an example: bind mouse4 "use weapon_hegrenade" You can also add text headers in your autoexec in order to keep different types of binds separated and labeled. Just add "//" to the beginning to make sure that the game doesn't try to read it as a command. The following is an example of what my autoexec looks like, so if you need more examples of buy script set up look here: //Walk Toggle Script alias walk "+speed; bind q run" alias run "-speed; bind q walk" bind q "walk" //Net_Graph Script alias +netgraph "net_graph 3" alias - netgraph "net_graph 0" bind alt "+netgraph" //Buy Scripts bind kp_home "buy p228; buy vest; buyammo2; buyammo2" bind kp_uparrow "buy m3; buy vest; buyammo1; buyammo1" bind kp_pgup "buy p90; buy vest; buy primammo" bind kp_leftarrow "buy galil; buy famas; buy vest; buy primammo" bind kp_5 "buy ak47; buy m4a1; buy vest; buy primammo" bind kp_rightarrow "buy sg552; buy aug; buy vest; buy primammo" bind kp_end "buy hegrenade; buy flashbang" bind kp_downarrow "buy primammo; buy secammo" bind kp_pgdn "buy vesthelm; buy vest" //Game Configs cl_showfps 1 hud_drawhistory_time 1 hud_deathnotice_time 3 hud_saytext_time 5 cl_smooth 0 cl_ragdoll_collide 1 bind mouse4 "use weapon_flashbang" bind mouse5 "use weapon_hegrenade" [/QUOTE]
Verification
Post reply
First Person Shooters & Third Person Shooters
Counterstrike CZ/CS/CSS/GO Forum
How to make a CS: Source Buy Script
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top