|Need some help with Scripts? Aliases? Binds?
Well, this is a good place to start. Just click on Basic Training and see for yourself. If you already know the basics, jump to the Intermediate stuff. Then if you need more, go to my Expert Examples. If thats not enough, go to my full length Buy Script Tutorial.
|Updating for CS 1.0
I am currently adding the new weapons to the pages and to the BUYALL Script. Also, check out my newly completed CounterStrike Command/Cvar List. I have updated the ones that are found on Z_Malloc and PlanetHalf-Life and took out the TFC commands and the ones that don't work in CS.
|CounterStike Bindable Key List
Here is a list of possible keys you can bind. Depending on your keyboard, you may have a few more, but here are the basic ones:
The Letter Keys: (A) to (Z)
The Number Keys: (0) to (9)
The Mouse Buttons: (mouse1) (mouse2) (mouse3) (mouse4) (mouse5) (mwheelup) (mwheeldown)
The Special Keys: (enter) (space) (shift) (ctrl) (alt) (backspace)
(tab) (escape) (pause)
The Function Keys: (F1) (F2) (F3) (F4) (F5) (F6)
(F7) (F8) (F9) (F10) (F11) (F12)
The Scroll Keys: (ins) (del) (home) (end) (pgdn) (pgup)
The Arrow Keys: (leftarrow) (rightarrow) (uparrow) (downarrow)
The Keypad Keys: (kp_ins) (kp_del) (kp_end) (kp_downarrow) (kp_pgdn)
(kp_leftarrow) (kp_5) (kp_rightarrow) (kp_home) (kp_uparrow) (kp_pgup)
(kp_slash) (*) (kp_minus)
Misc Keys: (,) (.) (/) () (;) (’) ([) (]) (-) (=) (~)
|Having problems with your Script/Alias
Check out my NEW Script Debugging Page here. This is a description of what to check for to find errors in your script. Also, I have included a few Most Common Errors!
|Still having problems with your Script/Alias
After a long post on the CS Forums, I realized that there are no really good FAQ's for CS Scripting/Binds. So I am in the process of making one that answers every question on that forum that I have read and that was answered correctly. I will also put the name of the person that answered the question so they will still get credit for it. I am about 60% complete with over 70 questions already. I figure I will have about 130 questions total. If you have some good ideas or FAQ's already and you don't mind if I use them. E-mail me now! Thanx!
|Check out my New Full Length Buy Script Tutorial!
I have completed my full length Buy Script Tutorial, check it out here! You can also download the Word File copy here. Also, I have a Basic Radio Script for players that only want the basics for radio commands. Plus, I have made a zip file for all my aliases on this page here. Don't forget the MixoPliX BUYALL script either.
|Basic Training (Basic Definitions)
Alias - binds commands together to perform mutiple tasks at the hit of one button.|
alias (name) "cmd1; cmd2"
or alias buymp5 "buy; menuselect 3; menuselect 1"
This selects the buy menu, then menu 3, then selection 1, which is an MP5. You would then bind a key to "buymp5".
Bind - combines a (key) with a command or alias
bind "(key)" "(command)"
bind Z "+reload"
Now the key Z is bound to the reload command. So if I press Z you will reload.
*Note* All your binds are saved in a file called the config.cfg. This file automatically rebinds the numbers 0-9 to the slots, so if you binded them earlier, expect the game to rebind them to the slots 0-9.
Autoexec - The autoexec.cfg file is a file that is executed during the loading of the game. It usually
follows the config.cfg file. The Autoexec is user created and is NOT generated by the game. To make a autoexec,
simply open up Notepad in WIN95/98/ETC and save the file as autoexec.cfg in your cstrike directory. This file
will contain your aliases and game related info other than binds. Here is a copy of a generic autoexec.
Config.cfg - This is a file generated by Half-Life and is located in your cstrike directory. It saves the game information from the last
time you quit the game. The file contains all of the Half-Life game settings and configurations you chose within the game. You can edit
this file in Notepad or within the game using the console. Here is an example of a standard config.cfg file, note the bind for "Z" is "cover"
from the above alias and bind examples.
Other .cfg files - You can also create other .cfg files and have them executed by adding: exec XXXX.cfg
to your autoexec.cfg file. For example, if I have numerous buy commands and putting them all into the autoexec will get too cluttered;
I can make a buy.cfg file and put all my buy aliases in there. I would then just add the line: exec buy.cfg in my autoexec.cfg file.
OK, We have covered the 4 basics of Aliases, Binds, and Scripting. Now we will go into more of the direct game commands
that are available to you without aliases. Basically they are premade aliases for certain actions.|
+attack - Your primary attack
+attack2 - Your secondary or special function for the weapon, Sniper Scope, Burst Fire, etc.
+jump - This makes you jump, go figure.
+crouch - This makes you crouch.
buy - This opens the Buy Menu.
buyequip - This opens the Buy Equipment Menu.
buyammo1 - This buys one primary magazine or clip.
buyammo2 - This buys one pistol clip.
radio1 - This opens up Radio1 Menu.
radio2 - This opens up Radio2 Menu.
radio3 - This opens up Radio3 Menu.
menuselect 1-8 - These select whatever is in that slot.
slot1-10 - These are used instead of choosing numbers 1-10.
developer 1 - This diplays info to your screen, with the echo command, 0 is off and 1 is on.
weapon_(name of wpn)Fill in the weapon name from this list:
Pistols - glock18/usp/deagle/p228/elite/fiveseven
Submachineguns - mp5navy/p90/tmp/mac10/ump45
Assault Rifles - ak47/sg552/m4a1/aug
Shotguns - m3/xm1014
Sniper Rifles - scout/awp/g3sg1/sg550
Machinegun - m249
Other - c4/knife
Grenades - flashbang/hegrenade/smokegrenade
- This selects the weapon directly, by binding a key like "h" to weapon_knife, and pressing "h", you will immediately pull out your knife.
+reload - Reloads weapon that is currently being used.
+use - This is the the use command.
adjust_crosshair - This changes the color of your crosshair. This helps where the background color is similar to the crosshair.
drawradar - This shows your friendly radar; "hideradar" hides it.
name - This changes your name; like name "Blaster", will make your name Blaster.
+showscores - Shows the scores.
+speed - This is how you creep or walk.
volume - You can adjust volume with this.
net_graph 1 - This shows your fps, network latency, up & downstream bandwidth, and your client and server update rate. net_graph 0 turns it off, net_graph 3 shows the info without the graph and saves some fps.
say This is used to say something to everyone in the game with text.
say_teamThis is used to just talk to your team. Note* When you are dead, the living team members cannot see your messages.
echo - Used to show text in the console and on screen. Used alot with developer.
fps_max - This is your max fps, set it to 100.
rate - This is your rate. This is set dependent on your connection.
pushlatency - Set this to the opposite of your ping, ie ping=150, pushlatency=-150.
changeteam - This is how you change between Terrorist and Ct's.
toggleconsole - This brings down your console.
impulse100 - This is your flashlight.
impulse201 - This is how you spray your logo.
snapshot - This takes a screenshot.
drop - This drops whatever is in your hands at the time you use it.
showbriefing - This shows the map briefing.
hud_fastswitch - This setting allows you to change weapons with one key press. Default is 0 off, and 1 is on.
cl_showfps - This shows your FPS, default is 0 off, and 1 is on. Better than netgraph for saving FPS.
Did you get enough. As you can see this game is very customizable. This is only the major ones used. The game sets many of these for you, but you can bind them to the keys that are better for you and easier when you use the config.cfg file. Most of the keys are already bound by default.
|SxRxRnR's Expert Examples
Now lets put all of this information together. Here are some useful aliases using the information from above. Remember to bind these aliases to whatever key that you want. The binds below are only for examples.
If the alias starts with a (+), then use that in the binds, not the (-). What this does is executes the alias (+) when you press the button and stops it when you release it (-).|
Nameswap Alias - This alias changes your name between two names with a single keystroke. Just plug your names in instead of the examples. Also, note that if you want spaces in your name, replace the space with a % sign,
like: name N%e%w%b%i%e.
alias nameswap "name1"
alias name1 "name KillerX; alias nameswap name2"
alias name2 "name [XTC]KillerX; alias nameswap name1"
bind "x" "nameswap"
Quick Pistol Alias - This immediatey brings out your pistol. Very useful when you run out of ammo on your primary weapon or if you are in a
firefight and don't have time to reload.
alias qpist "slot2; +attack; wait; -attack"
bind "a" "qpist"
Quick Weapon Alias - This immediatey brings out your primary weapon. Use this to quickly switch back to your primary weapon.
alias qwpn "slot1; +attack; wait; -attack"
bind "l" "qwpn"
Quick Knife Alias - This immediatey brings out your knife. Very useful when you run out of ammo on your primary weapon/pistol or if you are in a
firefight and don't have time to reload.
alias qknif "weapon_knife"
bind "f" "qknif"
Quick Grenade Alias - Brings out first grenade available.
alias qgren "slot4; +attack; wait; -attack"
bind "q" "qgren"
Defuse & Cover Alias - This Alias tells your team to Cover you as you defuse the bomb. You bind a key to +defuse.
alias +defuse "+use; radio1; menuselect 1; slot10; say_team Cover me I'm defusing the bomb"
alias -defuse "-use; slot10"
bind "d" "+defuse"
Bomb Plant Alias - This Alias plants the bomb and tells your team to Cover you. You bind a key to +bomb
alias +bomb "weapon_c4; +duck; +attack; wait; radio1; menuselect 1; slot10; say_team Cover me I'm planting the bomb"
alias -bomb "-duck; -attack; slot10"
bind "b" "+bomb"
Crouch Jump Alias - This is a widely used Alias to Crouch Jump instead of standard jump, for added height.
alias +cjump "+jump; +duck"
alias -cjump "-jump; -duck"
bind "space" "+cjump"
Crosshair Adjuster Alias - This adjusts the Crosshair color in game.
alias cross "adjust_crosshair"
bind "c" "cross"
Reload & Cover Alias - This reloads your weapon and asks for cover.
alias +recov "+reload; wait; -reload; radio1; menuselect 1; say_team cover me I'm reloading"
alias -recov "slot10; wait; wait; slot10"
bind "r" "+recov"
FPS Viewer Alias - This toggles your FPS on and off.
alias fps "fpson"
alias fpson "cl_showfps 1; alias fps fpsoff"
alias fpsoff "cl_showfps 0; alias fps fpson"
bind "," "fps"
Net Graph Alias - This is used to toggle the netgraph on and off.
alias graph "graphon"
alias graphon "net_graph 3; alias graph graphoff"
alias graphoff "net_graph 0; alias graph graphon"
bind "j" "graph"
Radar Alias - This toggles your radar on and off.
alias radar "radaroff"
alias radaroff "drawradar; alias radar radaron"
alias radaron "hideradar; alias radar radaroff"
bind "." "radar"
Demo Record Alias - This records and stops a demo.
alias RecDemo "RecOn"
alias RecOn "record CSDemo1; alias RecDemo RecOff"
alias RecOff "stop; alias RecDemo RecOn"
bind "-" "RecDemo"
Weapon View Alias - This toggles your viewable weapon on and off. Try it if you need fps.
alias wpnview "wpnoff"
alias wpnoff "r_drawviewmodel 0; alias wpnview wpnon"
alias wpnon "r_drawviewmodel 1; alias wpnview wpnoff"
bind "=" "wpnview"
Netcode Alias ~ by:EqualHate - This toggles the new Valve Netcode on and off. This way you can change it in game to see which way works better for you.
alias dev1 "developer 1"
alias dev0 "developer 0"
alias netswitch "net_on"
alias netstatus1 "dev1; echo NETCODE ENABLED; dev0"
alias netstatus0 "dev1; echo NETCODE DISABLED; dev0"
alias net_on "cl_lc 1; cl_lw 1; alias netswitch net_off; netstatus1"
alias net_off "cl_lc 0; cl_lw 0; alias netswitch net_on; netstatus0"
bind "x" "netswitch"
Status Report Alias - This alias gives you the scores, your fps and the timeleft with one key press. Bind a key to +statusrpt.
alias +statusrpt "+showscores; cl_showfps 1; timeleft"
alias -statusrpt "-showscores; cl_showfps 0"
bind "TAB" "+statusrpt"
HE Grenade Buy & Throw Alias - This alias buys you a grenade and primes it when you press the key and throws it when you release it.
alias +buythro "buyequip; menuselect 4; wait; wait; weapon_hegrenade; wait; wait; +attack"
alias -buythro "wait; -attack"
bind "enter" "+buythro"
Crouch Toggle Alias - This alias allows you to crouch without holding a key. Press it once to crouch and again to stand.
alias duck_t "duck_on"
alias duck_on "alias duck_t duck_off; +duck; developer 1; echo Ducking enabled; developer 0"
alias duck_off "alias duck_t duck_on; -duck; developer 1; echo Standing enabled; developer 0"
bind "x" "duck_t"
Walk Toggle Alias - This alias allows you to walk without holding a key. Press it once to walk and again to run.
alias walk_t "walk_on"
alias walk_on "alias walk_t walk_off; +speed; developer 1; echo Walking enabled; developer 0"
alias walk_off "alias walk_t walk_on; -speed; developer 1; echo Running enabled; developer 0"
Bind "w" "walk_t"