View Single Post
The scripting tutorial for beginners
Old 12-11-2009, 06:21 PM   #1
MrShowtime
Trusted Uploaders
 
MrShowtime's Avatar
 
Join Date: Dec 2009
Location: Varna
Posts: 8
Thanks: 3
Thanked 28 Times in 9 Posts
Rep Power: 3
MrShowtime is on a distinguished road
MrShowtime is offline

Default The scripting tutorial for beginners


Hi! Today i will teach you how to create a easy script for counter strike (the easy way for beginners)

First you have to open notepad.

Now i will tell you the basics.

First of all, you have to start typing alias (screenshot A). What does alias? Alias binds a command together to perform multiple tasks at a one hit of a button.

Then, after typing alias, type in quotes the name of the first alias. Example: "fire"
These are the basics, now we go next.

Now, let a space and put again quotes and in quotes, now, you type a command you want to be executed in-game. Example: "+attack"

That command will execute the command Fire at infinite. To stop it, we have to do this: "+attack;wait;-attack"
It is a difference between +attack and -attack command. -Attack is the command that stops the attack command, so the command will be executed just one time. The command "wait" is used to execute the command successfully, so if i didn't put the "wait" command, there was an overflow and the command didn't executed successfully. So now you should have like this: (screenshot B)
Later i will tell you all the commands. +Attack is the first command you learned.
Now, as i said, the name of the alias is very important. You need it right now.

Now we finished the command and now we get to binding.

Do like this: Bind "v" "name of the alias"

Example: My alias name was "fire" so i will type like this: Bind "v" "fire"
(Screenshot C)

That's it, now copy the command in config.cfg located in counter strike 1.6\cstrike folder.
Now, as i said, i will give you all commands.

+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.

// tut made by cr8ice from fpsbanana
__________________
  Reply With Quote
The Following 6 Users Say Thank You to MrShowtime For This Useful Post:
Rima (12-24-2009)