View Single Post
Old 05-03-2007, 11:16 PM   #5
..the wonders I have seen
acdcfanbill's Avatar
Status: Super Moderator
Join Date: Jun 2001
Location: Random Hell Wholes around the
Posts: 5,893
Imperialist Meatbags Guild Member  The Walking Carpets Guild Member  LFN Staff Member  10 year veteran! 
'vstr' is a way of telling the engine your going to execute a command(s) thats stuck in a variable basically. technically it stands for variable string.

so what this type of thing does is, it makes the first varible, which i called 'map1'. this variable holds all the information inside the double quotes. that way, when you 'vstr' said varible, it will execute the lines given.

lets look at that first line now.

set map1 "map yourfirstmap; set nextmap vstr map2;"

we know what map1 is, it's the variable that gets set to the stuff after it in quotes, "map yourfirstmap; set nextmap vstr map2;". So we need to know what happens when you vstr that varible. the first thing that happens, is that it does 'map yourfirstmap;' right away. you should note that a semi colon ';' is a way of putting a line break, or two commands, on one line.
The next line says 'set nextmap vstr map2' which means that the variable nextmap, which is what the server loads after the current map gets finished, is set to 'vstr map2'. since we know what vstr does, we need to know what map2 is. but that got set when the server started because all the lines in yoru cfg are executed. so map2 is actually set too...

set map2 "map yoursecondmap; set nextmap vstr map3;"

do you see how that it works?

If you are unclear about how it works still, feel free to keep asking questions.

I should note that all the map# variables get set when the server starts, because it runs through the .cfg sequentially, setting all the map# varibles to their respective settings, and then it hits 'vstr map1' at the bottom. this is what starts the map rotation, it sets the first map with its 'map yourfirstmap' part, and then sets the 'nextmap' variable for the server to use after the current map is finished.

acdcfanbill is offline   you may: