Saturday, March 14, 2009

counter strike source: cs 1.6: css: script making 101.

1. Setup
2. Entering Commands
3. Weapon Bind Names
4. Radio Bind Names
5. Key Bind Names
6. Important Notes
7. Sample Autoexec

* Setup *
First, we'll need to make an autoexec file for your binds to go in...

- Open up the:

C:\Valve\Steam\Steamapps\youremail\counter-strike source\cstrike\cfg


- Right-Click anywhere in the folder, from the pop-up list go to New >>> Text

*** Use Notepad for creating / editing your configs to prevent any possible
problems ***

- Once you open up the new text file, 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 an autoexec.cfg, this is
where you will enter in your commands.

* Entering Commands *
- Now, here's how the buy scripting works in Source. 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"

- The following formats can be used and your scripts will still function

bind f1 "buy ak47; buy primammo; buy vest; buy hegrenade"
bind "f1" "buy ak47; buy primammo; buy vest; buy hegrenade"
bind F1 "buy ak47; buy primammo; buy vest; buy hegrenade"
bind f1 "buy AK47; buy PRIMAMMO; buy VEST; buy HEGRENADE"
bind f1 "buy ak47;buy primammo;buy vest;buy 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

//Weapon Binds
bind f1 "buy ak47; buy m4a1; buy primammo; buy vest; buy hegrenade"
bind f2 "buy sg552; buy aug; buy primammo; buy vest; buy hegrenade"

//Game Configs
cl_showfps 1
cl_smooth 0

* 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

- Pistols:

"Glock18 Select Fire" - glock
"H&K 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
"H&K MP5-Navy" - mp5navy
"H&K UMP45" - ump45
"FN P90" - p90

- Assault Rifles:

"Galil" - galil
"Famas" - 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
"H&K 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

* Radio Bind Names *
You can also bind radio commands now, here is the list of the radio messages
and their proper bind name...

- Radio A:

"Cover Me" - coverme
"You Take the Point" - takepoint
"Hold This Position" - holdpos
"Regroup Team" - regroup
"Follow Me" - followme
"Taking Fire, Need Assistance" - takingfire

- Radio B:

"Go" - go
"Fall Back" - fallback
"Stick Together Team" - sticktog
"Get in Position" - getinpos
"Storm the Front" - stormfront
"Report In" - report

- Radio C:

"Affirmative/Roger" - roger
"Enemy Spotted" - enemyspot
"Need Backup" - needbackup
"Sector Clear" - sectorclear
"I'm in Position" - inposition
"Reporting In" - reportingin
"She's gonna Blow!" - getout
"Negative" - negative
"Enemy Down" - enemydown

* Key Bind Names *
Here is the list of the keyboard keys you can bind and their proper bind

[Esc ] [F1] [F2] [F3] [F4] [F5] [F6] [F7] [F8] [F9] [F10] [F11] [F12]

[`] [1] [2] [3] [4] [5] [6] [7] [8] [9] [0] [-] [=] [Backspace]

[ Tab ] [Q] [W] [E] [R] [T] [Y] [U] [I] [O] [P] [{] [}] [ \ ]

[ CAPS ] [A] [S] [D] [F] [G] [H] [J] [K] [L] [;] ['] [ Enter ]

[ Shift ] [Z] [X] [C] [V] [B] [N] [M] [,] [.] [/] [ Shift ]

[Ctrl] [N/A] [Alt] [ Space Bar ] [Alt] [N/A] [N/A] [Ctrl]

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 - pgdn
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 *
- Buy scripting in source is a lot more lenient when it comes to format. You
can use capital letters for the weapon names and keys, also you can remove
the spaces between different items (buy vest;buy primammo) and your script
will still work properly. Although mistakes can still happen...

- 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 it you just want to buy
one or two magazines of AWP ammo or pistol 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"

* Sample Autoexec *
The following is an example of an autoexec that has buy scripts, toggle scripts
and game configs in it so you can see an example of how it all looks when used

//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 ctrl "+netgraph"

//Buy Menu Scripts
bind kp_home "buy deagle; buyammo2; buyammo2"
bind kp_uparrow "buy scout; buyammo1"
bind kp_pgup "buy mp5navy; buy primammo"
bind kp_leftarrow "buy galil; buy famas; buy primammo"
bind kp_5 "buy ak47; buy m4a1; buy primammo"
bind kp_rightarrow "buy sg552; buy aug; buy primammo"
bind kp_end "buy hegrenade; buy flashbang; buy smokegrenade"
bind kp_downarrow "buy primammo; buy secammo"
bind kp_pgdn "buy vest; buy vesthelm"

//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 mouse5 "use weapon_hegrenade"
bind mouse4 "use weapon_flashbang"
bind mouse3 "use weapon_smokegrenade"

counter strike source: How can I record a demo / take a screenshot

How can I record a demo / take a screenshot?
To record a demo in Counter-Strike, press your console key, this is usually above your TAB key and looks like , once you have the console up, type "record " (without quotes), this will start recording a demo. To stop recording, bring up the console again and type "stop". The demo will now be complete and is saved in your Steam\SteamApps\\counter-strike\cstrike folder named .dem.

To record a demo in Counter-Strike: Source, it is exactly the same as in Counter-Strike, except that after you have stopped recording, it is stored in your Steam\SteamApps\\counter-strike source\cstrike folder.

To play back your demo, make sure it is in the correct folder (see above), and in your console, type: playdemo . In Counter-Strike, you have the option of typing viewdemo instead, this includes a toolbar where you can change speed, pause, and skip time. This function is not included with Counter-Strike: Source at this time.

To take a screenshot in Counter-Strike, you can bind a key to "screenshot", by default it is bound to your F5 key. If you want to take a screenshot of your console, the best way it to type "screenshot" (without quotes) in your console, both these commands save it as a bitmap (.bmp) file named "map name xxxx.bmp" in your Steam\SteamApps\\counter-strike\cstrike folder, where xxxx is an auto-incremental value depending on how many screenshots you have taken of that particular map. In Counter-Strike: Source, you should bind a key to "jpeg" (without quotes), this will save it as a JPEG (.jpg) "named map name xxxx.jpg" in your Steam\SteamApps\\counter-strike source\cstrike\screenshots folder.