ET-Scripts
Welcome to the ET-Scripts website.
Enter your username and password to login.

Greetings,
Chef
ET-Scripts
Welcome to the ET-Scripts website.
Enter your username and password to login.

Greetings,
Chef
ET-Scripts
Would you like to react to this message? Create an account in a few clicks or log in to continue.

ET-Scripts

For all your Scripts and Configs.
 
HomeLatest imagesSearchRegisterLog in

 

 Chef's Guide - Config making (4) "Variable & Vstr"

Go down 
AuthorMessage
Chef
ET-Scripts Founder
ET-Scripts Founder



Posts : 34
Join date : 2009-03-27

Chef's Guide - Config making (4) "Variable & Vstr" Empty
PostSubject: Chef's Guide - Config making (4) "Variable & Vstr"   Chef's Guide - Config making (4) "Variable & Vstr" I_icon_minitime3/27/2009, 23:31

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

Spoiler:
Back to top Go down
http://et-scripts.omgforum.net
 
Chef's Guide - Config making (4) "Variable & Vstr"
Back to top 
Page 1 of 1
 Similar topics
-
» Chef's Guide - Config making (7) "+Vstr"
» Chef's Guide - Config making (3) "Extra Information"
» Chef's Guide - Config making (1) "The Basics"
» Chef's Guide - Config making (2) "Autoexec.cfg"
» Chef's Guide - Config making (5) "Toggle"

Permissions in this forum:You cannot reply to topics in this forum
ET-Scripts :: ET-Scripts :: Guides-
Jump to: