Hello all,


Since I have allready made some basic GUIDE's about cfg making/using I decided it is time for a somehow more advanced one.

This GUIDE will explain you how to use Variables, which is used it alot of cfgs.

First lets tell you what a Variable is.
In scripting we use variables to store information in, so that when we call that variable, we access the information stored in that variable.
It may sound a little strange but if you have some knowledge of scripting you will understand.

Now lets show you how to "store information" in a variable. To do that we use the "set" command (same as Seta)
We store something in a variable by using the set command as followed:
Code:
set VariableName "command1; command2; ..."
This stores the information in the variable but does not execute it.
To execute a vatiable we use the "vstr" command.
This will work like the following:
Code:
vstr VariableName
That will execute all commands in the variable.


Now lets give you an example:
Code:
set myName "name ^6Ham"
bind x "vstr myName"
This means if I press "x" my name will change to Ham


Maybe this does not make sence to you now, because this all could be done by just using the following:
Code:
bind x seta name ^6Ham
But when we are going to make more pro configs we will certainly need this


Greetings,
Chef

PS: I made multiple GUIDES for cfg making, to follow them in the correct order check the (number) in the topic title