Jump to content

Interesting Tip


thvnder

Recommended Posts

Just something I've picked up from messing with cfg's and scripts over the years. You may or may not already know that when you execute a config file you can exclude the file extension.

 

Ex: instead of '/exec et.cfg' you can just type '/exec et'

 

Combine this functionality with the ability to read config files in folders that exist in ETmain, and you can have some handy cfg's that are easy enough to activate in the console without binding them to a key. The best example I can think of to apply this practically is for name changing. In the past, I would have a namechange vstr that toggled through any names that I cared to use. Because some servers limit name changes, this could be problematic. So instead of creating a vstr to toggle the names, I created a folder in my etmain called 'name'. Each config file in my name folder is simply a command to change my name. For further simplicity, I keep them only 1 letter.

 

Ex. t.cfg only contains a command to change my name to 'thvnder'

 

So when I want to change my name to thvnder all I have to do is type "/exec name/t"

 

For anyone that uses a few different names, especially ones with complicated color formatting, this can definitely be handy.

 

Hope this was helpful to somebody :)

  • Like 2
Link to comment
Share on other sites

Yes, it was poorly designed like that rather than voice command :) . Even without creating the folder name, it will be automatically created. Say

 

/condump  newfolder/myconfump.txt

 

Same case with

 

/writeconfig anotherfoldername/mynewconfig.txt

 

This applies the same to  /screenshotjpeg command that does not need .jpg file extension. Like

 

/screenshotjpeg folder/filename

 

Ofcourse, the parent folder is your mod folder too. Having the above mechanism ensures that end-users have an organized file output (text files like scripts and condumps + jpeg file output) from ET.

 

 

Also, my current script contains a bind which just do vid restart . 

 

/bind m  vid_restart

 

So, pushing m will perform a video restart :)

  • Like 4
Link to comment
Share on other sites

Dont know whether you guys know or not. but u can create a file called "autoexec.cfg"

and in that file you can add all the commands you want executed when you load into a server

mine looks something like this:

 

echo "^3executing configuration setup..."
 
cl_noprint "1"
 
exec config-doug.cfg //binds & scripts
exec class.cfg        //classes
exec names.cfg //player names
exec mo.cfg //spawn selection
exec mo_st.cfg //spawn timer
 
cl_noprint "0"
 
echo "^dD^2oug^1'^sS ^7Config Loaded"
 
can be very handy :>
Link to comment
Share on other sites

Well of course if there are settings/binds that you want to load up every time you join a server you would use put that in your autoexec.

 

But not everything that you would ever execute in a cfg file is something that you want to be loaded by default every time you join a server.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.