Jump to content

[GuiDe]A scripting tutorial.


DreaM

Recommended Posts

This is a Tutorial on Scripts:

 

Now lets begin, shall we.

 

///////////////////////////////////////////////////////////////////////////////////////

The Basics

///////////////////////////////////////////////////////////////////////////////////////

 

First, go to Start>Run and type C:\Program Files\Steam\steamapps\user_name\counter-strike\cstrike

(This way, you can have easy access going into this folder).

(As Seen in Screen Shot A)

 

Now, view your folder. You should see one .cfg file that you should be concerned with. It is called, config.cfg. You should not worry about this file though. This file is for settings in game. For example, +mouse1 = fire. This, meaning, one click from the mouse button enables the weapon at hand to fire.

(As Seen in Screen Shot B)

 

Now, to get things further underway, there are a few other things that you should know about.

 

1. You do not need to make a file called, valve.rc

 

and

 

2. You do not need to save you custom settings and/or configurations in a file called, autoexec.cfg. You could but it really is not necessary.

 

I have tested this personally so there is no need to do any of the two above.

 

The reason why these are is this: remember the config.cfg file? Well, at the very bottom of this file is the command, exec userconfig.cfg.

(As Seen in Screen Shot C)

 

That command tells the game to execute the configuration file. Unfortunately, we do not have a file called, userconfig.cfg, but we will - soon enough.

 

Oh, yeah. All of this scripting stuff must be done in notepad.exc, and save this file titled, userconfig.cfg.

(As Seen in Screen Shot D)

 

//////////////////////////////////////////////////////////////////////////////////////

Binding

//////////////////////////////////////////////////////////////////////////////////////

 

Now, ask yourself - what is binding?

 

Binding is how you associate a command to a key (This is laments terms). Everything that happens in the game are associated commands.

 

For example: pressing w (Default) makes you move forward. Well, this command is +forward.

 

Now, to bind a key. Well, binding is very simple. This is the structure on how the bind works:

 

bind "command"

 

Of course, you can bind a key to several commands instead of one like so:

 

bind "command; command 2"

 

Of course, when you do this, make sure you put a space after the semi-colon or else the second command would not read - but the first command will. Also, you must code the command correctly. Please keep these 2 things in mind.

 

//////////////////////////////////////////////////////////////////////////////////////

Alias

//////////////////////////////////////////////////////////////////////////////////////

 

An alias associates a bunch of commands, like a bind, but the difference is that you assign a name to it.

 

The alias structure is not very much different than the binding structure.

 

For example:

 

alias xxx "command1; command2"

 

xxx = AnyName

 

Then, you must bind this to a key. Be it any key you want to.

 

Example:

 

bind f1 "xxx"

 

xxx= the name that you have assigned to the alias.

 

//////////////////////////////////////////////////////////////////////////////////////

Saving the script

//////////////////////////////////////////////////////////////////////////////////////

You can save all of this in the file, userconfig.cfg. Go to Start>Run and paste this into your cstrike folder.

(As Seen in Screen Shot E)

 

//////////////////////////////////////////////////////////////////////////////////////

Screenshot's

//////////////////////////////////////////////////////////////////////////////////////

 

A 3366.jpg

B width=640 height=414http://image.hazardstrip.com/ss/tuts/3367.jpg[/img]

C width=640 height=414http://image.hazardstrip.com/ss/tuts/3368.jpg[/img]

D width=640 height=414http://image.hazardstrip.com/ss/tuts/3369.jpg[/img]

E width=640 height=414http://image.hazardstrip.com/ss/tuts/3370.jpg[/img]

 

 

///////////////////////////////////////////////////////////////////////////////////////

 

credits to : chrisbitm

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • L2 Insignia High Five 20x MID SERVER FOCUSED ON OLYMPIAD | PVP | AUTOFARM       OPEN BETA TEST SERVER 3 MAY 2024   GRAND OPENING 10 MAY 2024    Rates: 📜 XP/SP 20x | Spoil 15x | Drop 10x | Adena 10x 📜     Server Features: 🔥 No Olf-T Shirt, No big over-enchant, No over-power Donate 🔥 🔥 VIP Gold Color Chat, Unique Olympiad Extra Points Engine, GvG Event 🔥 🔥 Auto-Farm, LoA and DV scheduled PvP Zone, Calendar Daily Reward 🔥 🔥 Castle Instance, Solo Instance, PvP Solo Rift, Dress me system, Adena Boxes 🔥        Website: https://www.l2insignia.com  Discord: https://discord.com/invite/yEgsrHn2hQ      
    • I am selling the essence project which includes versions 388 and 439 that have been running for over 2 years or (447 as custom PVP like Pride). I have a test server for you to test them out. If you are really interested in it then contact my seller at discord: kiwi7106. Price: 4000 Euro P/s: This is a project that I have spent a lot of money and time developing, so if you are not interested in it, please get out of this topic, thank you. P/s 2: If you find the price too expensive, it's best to skip this article and find another project and don't comment negatively on my topic, thank you.
    • Someone ask me for this, it should work on any client that has Kamael race, preview:     Installation - there are two ways to install depending on how you want to use it:   Method 1: If you want to completely replace the original, do:   Copy all lines from your armorgrp to Notepad++, press Ctrl+H, check the "match whole word" option and replace:   kamael.Mkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_MKamael_m001_w_ad00   Then replace:   MKamael.Mkamael_m000_t00_w   by:   AvengersKamaelWings.MKamael_m001_t00_w   Now repeat the same process with the female, replace:   kamael.Fkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_FKamael_m001_w_ad00   Then replace:   FKamael.Fkamael_m000_t00_w   by:   AvengersKamaelWings.FKamael_m001_t00_w   You're done, paste everything back into File Edit and save!   Method 2: If you only want to replace in specific sets, execute the above process only on the armorgrp of those sets.   Repack by: AvengersTeamBr Password: LadrãoDeFrango      
  • Topics

×
×
  • Create New...