Jump to content

I'll post a few, little known tricks for cfg users.


Bennett Talpers

Recommended Posts

Ok, since my computer is defragging, I'll spend some time helping you guys out.

 

First off, open your config, and add the following lines:

 

Unbind 1
Unbind 2
Unbind 3
Unbind 4
Unbind 5
Unbind 6
Unbind 7

 

Now add these lines underneath:

 

bind 1 	"weaponbank 1;cg_autoreload 0"
bind 2 	"weaponbank 2;cg_autoreload 1"
bind 3 	"weaponbank 3;cg_autoreload 0"
bind 4 	"weaponbank 4;cg_autoreload 0"
bind 5 	"weaponbank 5;cg_autoreload 0"
bind 6 	"weaponbank 6;cg_autoreload 0"
bind 7 	"weaponbank 7;cg_autoreload 0"

 

What you just did, is made it so when you select pistol(s), autoreload is on, but when you have primary weapon, it is off. This is useful swapping to secondary if primary runs out of ammo, without worrying about taking cover while reloading.

 

 

Demo script:

 

Unbind F12
bind F12 "vstr demor"
         set demoon "autorecord; echo ^7~[^2Recording Demo^7]~;set demor vstr demooff"
         set demooff "stoprecord; echo ^7~[^1Stopped Recording^7]~;set demor vstr demoon"
         set demor "vstr demoon"

 

Fixes some 2.55 errors where the demo will not stop unless you manually type /stoprecord into the console.

 

 

 

My settings:

 

seta rate "25000"
  seta cl_maxpackets "76"
  seta snaps "20"
  seta com_maxfps "76"
  seta cg_drawfps "1"
  seta cg_bloodflash 0.0000
  seta cg_lagometer "1"
  seta r_gamma "1.8"

 

 

 

Crosshair color script

 

set crosshr "vstr crosshaircolor0"
set crosshaircolor0 "cg_crosshairColor black;echo ^pBLACK!!!!; set crosshr vstr crosshaircolor1"
set crosshaircolor1 "cg_crosshairColor red;echo ^qRED!!!!; set crosshr vstr crosshaircolor2"
set crosshaircolor2 "cg_crosshairColor green;echo ^rGREEN!!!!; set crosshr vstr crosshaircolor3"
set crosshaircolor3 "cg_crosshairColor yellow;echo ^SYELLOW!!!!; set crosshr vstr crosshaircolor4"
set crosshaircolor4 "cg_crosshairColor blue;echo ^tBLUE!!!!; set crosshr vstr crosshaircolor5"
set crosshaircolor5 "cg_crosshairColor cyan;echo ^5CYAN!!!!; set crosshr vstr crosshaircolor6"
set crosshaircolor6 "cg_crosshairColor magenta;echo ^vMAGENTA!!!; set crosshr vstr crosshaircolor7"
set crosshaircolor7 "cg_crosshairColor white;echo ^7WHITE!!!!; set crosshr vstr crosshaircolor8"
set crosshaircolor8 "cg_crosshairColor orange;echo ^xORANGE!!!!; set crosshr vstr crosshaircolor0"
bind . "vstr crosshr"

 

 

Volume changing script:

 

set vol00 "set s_volume 0.0;set voldown vstr vol00;set volup vstr vol01;echo ^sVolume ^7^0+^7----------"
set vol01 "set s_volume 0.1;set voldown vstr vol00;set volup vstr vol02;echo ^sVolume ^7-^0+^7---------"
set vol02 "set s_volume 0.2;set voldown vstr vol01;set volup vstr vol03;echo ^sVolume ^7--^0+^7--------"
set vol03 "set s_volume 0.3;set voldown vstr vol02;set volup vstr vol04;echo ^sVolume ^7---^0+^7-------"
set vol04 "set s_volume 0.4;set voldown vstr vol03;set volup vstr vol05;echo ^sVolume ^7----^0+^7------"
set vol05 "set s_volume 0.5;set voldown vstr vol04;set volup vstr vol06;echo ^sVolume ^7-----^0+^7-----"
set vol06 "set s_volume 0.6;set voldown vstr vol05;set volup vstr vol07;echo ^sVolume ^7------^0+^7----"
set vol07 "set s_volume 0.7;set voldown vstr vol06;set volup vstr vol08;echo ^sVolume ^7-------^0+^7---"
set vol08 "set s_volume 0.8;set voldown vstr vol07;set volup vstr vol09;echo ^sVolume ^7--------^0+^7--"
set vol09 "set s_volume 0.9;set voldown vstr vol08;set volup vstr vol10;echo ^sVolume ^7---------^0+^7-"
set vol10 "set s_volume 1.0;set voldown vstr vol09;set volup vstr vol10;echo ^sVolume ^7----------^0+^7"
set volup vstr vol05
set voldown vstr vol05
bind "]" "vstr volup"
bind "[" "vstr voldown"

 

 

Class Script (Only works on ETPUB):

 

Unbind DEL
Unbind PGUP
Unbind INS
Unbind PGDN
Unbind END

bind DEL "vstr cs_medic"
bind PGDN "vstr cs_fieldop"
bind END "vstr cs_engi_smg"
bind PGUP "vstr cs_covert_sniper"
bind INS "vstr cs_Panz"

//---------------------------------------------------------------------------
// Class Scripts
//---------------------------------------------------------------------------

//---
// Soldier Vstr
//---

set cs_panz   "class s 4 3;say_team ^[s^7oldier^9/^[P^7anzerfaust;bind INS vstr cs_mg42"
set cs_mg42   "class s 2 3;say_team ^[s^7oldier^9/^[M^7G-42;bind INS vstr cs_flamer"
set cs_flamer "class s 3 3;say_team ^[s^7oldier^9/^[F^7lamethrower;bind INS vstr cs_mortar"
set cs_mortar "class s 5 3;say_team ^[s^7oldier^9/^[M^7orter;bind INS vstr cs_panz"

//--
//Medic Vstr
//--

set cs_medic "class m 1 2;say_team ^[M^7edic"

//--
//Engineer Vstr
//--

set cs_engi_smg "class e 1 2;say_team ^[E^7ngineer^9/^[s^7MG;bind END vstr cs_engi_rifle"
set cs_engi_rifle "class e 2 2;say_team ^[E^7ngineer^9/^[R^7-Nade;bind END vstr cs_engi_smg"

//--
//Fieldop Vstr
//--

set cs_fieldop "class f 1 2;say_team ^[F^7ield Op"

//--
//Covert Vstr
//--

set cs_covert_sniper "class c 3 2;say_team ^[C^7ovie^9/^[s^7niper;bind PGUP vstr cs_covert_fg42"
set cs_covert_fg42   "class c 2 2;say_team ^[C^7ovie^9/^[F^7G42;bind PGUP vstr cs_covert_sten"
set cs_covert_sten   "class c 1 2;say_team ^[C^7ovie^9/^[s^7ten;bind PGUP vstr cs_covert_sniper" 

 

 

Team Script:

 

bind kp_home "team r 1 3 38; echo ^n~^0[ ^1axis ^0]^z~;say ^[G^7oing ^1Axis"
bind kp_uparrow "team s 1 3 38; echo ^n~^0[ ^2spectator ^0]^n~;say ^[G^7oing ^3Spectator"
bind kp_pgup "team b 1 3 38; echo ^n~^0[ ^4allies ^0]^n~;say ^[G^7oing ^dAllies" 

Link to comment
Share on other sites

i have written a very cool class changing script for etpub as well -- spawnpoint selection works in jaymod, but not the class selections. anyone know how to make a class-change script for jaymod? is it just different cvar names or is it not possible?

 

BTW your classchange script is OK but i don't like having the spam to teamchat. i just echo things to myself instead of bothering everyone else with what i'm doing.

 

the volume script is cool =D

 

anyone else use numpad for weapons instead of 1, 2, 3, 4, 5, 6, .... ??

Link to comment
Share on other sites

i have written a very cool class changing script for etpub as well -- spawnpoint selection works in jaymod, but not the class selections. anyone know how to make a class-change script for jaymod? is it just different cvar names or is it not possible?

 

BTW your classchange script is OK but i don't like having the spam to teamchat. i just echo things to myself instead of bothering everyone else with what i'm doing.

 

the volume script is cool =D

 

anyone else use numpad for weapons instead of 1, 2, 3, 4, 5, 6, .... ??

 

Mine is more for use in a scrim, as everybody needs to know who is changing to what class in order to strategize better.

 

 

Echo version:

    Unbind DEL
   Unbind PGUP
   Unbind INS
   Unbind PGDN
   Unbind END

   bind DEL "vstr cs_medic"
   bind PGDN "vstr cs_fieldop"
   bind END "vstr cs_engi_smg"
   bind PGUP "vstr cs_covert_sniper"
   bind INS "vstr cs_Panz"

   //---------------------------------------------------------------------------
   // Class Scripts
   //---------------------------------------------------------------------------

   //---
   // Soldier Vstr
   //---

   set cs_panz   "class s 4 3;echo ^[s^7oldier^9/^[P^7anzerfaust;bind INS vstr cs_mg42"
   set cs_mg42   "class s 2 3;echo ^[s^7oldier^9/^[M^7G-42;bind INS vstr cs_flamer"
   set cs_flamer "class s 3 3;echo ^[s^7oldier^9/^[F^7lamethrower;bind INS vstr cs_mortar"
   set cs_mortar "class s 5 3;echo ^[s^7oldier^9/^[M^7orter;bind INS vstr cs_panz"

   //--
   //Medic Vstr
   //--

   set cs_medic "class m 1 2;echo ^[M^7edic"

   //--
   //Engineer Vstr
   //--

   set cs_engi_smg "class e 1 2;echo ^[E^7ngineer^9/^[s^7MG;bind END vstr cs_engi_rifle"
   set cs_engi_rifle "class e 2 2;echo ^[E^7ngineer^9/^[R^7-Nade;bind END vstr cs_engi_smg"

   //--
   //Fieldop Vstr
   //--

   set cs_fieldop "class f 1 2;echo ^[F^7ield Op"

   //--
   //Covert Vstr
   //--

   set cs_covert_sniper "class c 3 2;echo ^[C^7ovie^9/^[s^7niper;bind PGUP vstr cs_covert_fg42"
   set cs_covert_fg42   "class c 2 2;echo ^[C^7ovie^9/^[F^7G42;bind PGUP vstr cs_covert_sten"
   set cs_covert_sten   "class c 1 2;echo ^[C^7ovie^9/^[s^7ten;bind PGUP vstr cs_covert_sniper" 

Link to comment
Share on other sites

  • Administrators
anyone know how to make a class-change script for jaymod? is it just different cvar names or is it not possible?

 

I hade made this long time back. In cfg it says hell_RETURN$ which is basically me.

 

http://www.mediafire.com/?31mmzblvjmn

 

If I am not wrong i just used 2 keys.

 

Readme.txt

F7 - allies and press more to change class.
F8 - axis and press more to change class.
F9 - after u are done selecting u class press f9 to select u weapon.

How to use it? Download axis.cfg,allies.cfg and class.cfg and put them in etmain folder. 

Now if u have u cfg under some name or under autoexec.cfg add this line to it.

exec class.cfg

Enjoy !!
hell_RETURN$

Link to comment
Share on other sites

  • Administrators
bind f7 exec team
bind f8 exec class
bind f9 exec weapon

 

Like that?

 

No. Just download the zip file from my link. Unzip it anywhere you like. It has 3 cfg. Put that in your etmain folder. Just add this to your config:

 

exec class.cfg

 

F7 to change class in allies.

F8 to change class in axis.

F9 to change weapons.

Link to comment
Share on other sites

ah.. ok so in ETPUB or PRO to select engineer, from my spawnscript:

 

set goEng_smg "class e 1 2; echo ^wRespawn ^f-> ^w Engineer smg; kill; wait; forcetapout"

 

but in jaymod to go engineer, from what daredevil posted:

 

set wp31 "team b 2 8 37; echo ^2Engineer^*/^2Weapon^*: ^2Thompson; set wp3 vstr wp32"

 

 

so in etpub engi with smg and dual pistols is:

/class e 1 2

 

and in jaymod engi with smg and dual pistols is

/team (r or B) 2 8 37

 

now if i can just find a comprehensible list of classes/weapons for jaymod...

Link to comment
Share on other sites

not as in a one-button script -- i want a list of what the commands are for each class/weapon..

 

like this for etpub:

 

Engi smg single pistol = class e 1 1

Engi smg dual pistols = class e 1 2

Engi k43 single pistol = class e 2 1

Engi k43 dual pistol = class e 2 2

Engi shotgun single pistol = class e 3 1

Engi shotgun dual pistol = class e 3 2

Fop smg single pistol = class f 1 1

Fop smg dual pistol = class f 1 2

 

etc etc etc

 

but with the jaymod values, so i can alter my spawn selector script to have a working variant for jaymod.

Link to comment
Share on other sites

Comprehensible as in one button for a change? There are none.

 

oh really? now i know you could write one for one button that you have to tap 23 times before you get to the class you want to select, but then you would still need another button bound to select "Medic with Flamethrower and Dual Pistols" so that's two buttons... however.. i write my own code for this i don't just pull it off the web and...

 

check this out:

 

spawn selection for etpub in 1 keys: F9 activates class selector and deactivates it on 2nd press. while active numpad is bound to class selection ( execs "bindexec.cfg" to restore numpad binds on 2nd keypress ).

 

in 4 cfg's:

 

SPAWNCHANGE ON

///////////////////////////////////////////////////////////////////////////
// Spawnchange_on
//	-switches numpad to spawn selection binds
//	-classes defined in Spawnchange_01.cfg
//
// binds		numpad
///////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////
// notify me of status
///////////////////////////////////////////////////////////////////////////

echo "^3Spawnchange Script Active!"

///////////////////////////////////////////////////////////////////////////
// reassign numpad keys
///////////////////////////////////////////////////////////////////////////

// classes
bind KP_INS "vstr class00"

bind KP_END "vstr class01"
bind KP_DOWNARROW "vstr class02"
bind KP_PGDN "vstr class03"
bind KP_LEFTARROW "vstr class04"
bind KP_5 "vstr class05"
bind KP_RIGHTARROW "vstr class06"
bind KP_HOME "vstr class07"
bind KP_UPARROW "vstr class08"
bind KP_PGUP "vstr class09"

// spawnpoints
bind KP_SLASH "setspawnpt 0; echo ^f ->^2 Default Spawn"
bind *	"setspawnpt 1; echo ^f ->^2 Spawnpoint 1"

set togSpawnpt vstr "togSpawnpt_2"
bind KP_MINUS vstr "togSpawnpt"
set togSpawnpt_2 "setspawnpt 2; echo ^f ->^2 Spawnpoint 2; set togSpawnpt vstr togSpawnpt_3"
set togSpawnpt_3 "setspawnpt 3; echo ^f ->^2 Spawnpoint 3; set togSpawnpt vstr togSpawnpt_4"
set togSpawnpt_4 "setspawnpt 4; echo ^f ->^2 Spawnpoint 4; set togSpawnpt vstr togSpawnpt_5"
set togSpawnpt_5 "setspawnpt 5; echo ^f ->^2 Spawnpoint 5; set togSpawnpt vstr togSpawnpt_2"


// spectator
//bind KP_PLUS "team s; echo ^f -> ^3 SPECTATOR"

// show classes
bind KP_ENTER "vstr classList"

///////////////////////////////////////////////////////////////////////////
// set next F9
///////////////////////////////////////////////////////////////////////////

bind F9 "exec spawnchange_off.cfg"

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

 

SPAWNCHANGE OFF

//////////////////////////////////////////////////////////////////////////////
// Spawnchange_off
//	returns numpad binds to default
//
//
// binds		none	
///////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////
// notify me of status
///////////////////////////////////////////////////////////////////////////

echo ^3Spawnchange Script Deactivated!"

///////////////////////////////////////////////////////////////////////////
// restore default controls
///////////////////////////////////////////////////////////////////////////

exec bindexec.cfg

///////////////////////////////////////////////////////////////////////////
// set next F9 to activate Spawnchange Script
///////////////////////////////////////////////////////////////////////////

bind F9 "exec spawnchange_on.cfg"


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

 

SPAWNCHANGE 01

///////////////////////////////////////////////////////////////////////////
// Spawnchange_01
//	-binds numpad to spawn selction functions
//	-restores defaults on second keypress
//
//
// binds		F9	
///////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////
// set all class functions
///////////////////////////////////////////////////////////////////////////

set goEng_smg "class e 1 2; echo ^wRespawn ^f-> ^w Engineer smg; kill; wait; forcetapout"
set goEng_k43 "class e 2 2; echo ^wRespawn ^f-> ^w Engineer k43; kill; wait; forcetapout"
set goEng_sho "class e 3 2; echo ^wRespawn ^f-> ^w Engineer shotgun; kill; wait; forcetapout"
set goFop_smg "class f 1 2; echo ^wRespawn ^f-> ^w Field ops smg; kill; wait; forcetapout"
set goFop_sho "class f 2 2; echo ^wRespawn ^f-> ^w Field ops shotgun; kill; wait; forcetapout"
set goCov_stn "class c 1 2; echo ^wRespawn ^f-> ^w Covop sten; kill; wait; forcetapout"
set goCov_fg "class c 2 2; echo ^wRespawn ^f->^w Covop fg42; kill; wait; forcetapout"
set goCov_snp "class c 3 2; echo ^wRespawn ^f-> ^w Covop rifle; kill; wait; forcetapout"
set goSol_smg "class s 1 3; echo ^wRespawn ^f-> ^w Soldier smg; kill; wait; forcetapout"
set goSol_mg "class s 2 3; echo ^wRespawn ^f-> ^w Soldier mg42; kill; wait; forcetapout"
set goSol_fla "class s 3 3; echo ^wRespawn ^f-> ^w Soldier flame; kill; wait; forcetapout"
set goSol_pzf "class s 4 3; echo ^wRespawn ^f-> ^w Soldier panzer; kill; wait; forcetapout"
set goSol_mor "class s 5 3; echo ^wRespawn ^f-> ^w Soldier mortar; kill; wait; forcetapout"
set goSol_ven "class s 6 3; echo ^wRespawn ^f-> ^w Soldier venom; kill; wait; forcetapout"
set goMed_smg "class m 1 2; echo ^wRespawn ^f-> ^w Medic; kill; wait; forcetapout"

///////////////////////////////////////////////////////////////////////////
// assign class functions to standardized variables
///////////////////////////////////////////////////////////////////////////

set class00 "vstr goEng_smg" 
set class01 "vstr goEng_k43"
set class02 "vstr goFop_smg"
set class03 "vstr goCov_stn"
set class04 "vstr goCov_fg"
set class05 "vstr goCov_snp"
set class06 "vstr goSol_pzf"
set class07 "vstr goSol_mor"
set class08 "vstr goSol_mg"
set class09 "vstr goSol_fla"


set classList "exec spawnchange_list.cfg"

///////////////////////////////////////////////////////////////////////////
// set first F9 to activate script
///////////////////////////////////////////////////////////////////////////

unbind F9
bind F9 "exec Spawnchange_on.cfg"


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

 

SPAWNCHANGE LIST

//////////////////////////////////////////////////////////////////////////////
// Spawnchange_list
// echo current spawnchange binds
//
//
// binds none
///////////////////////////////////////////////////////////////////////////


echo ^w0 ^f-> ^wengineer smg
echo ^w1 ^f-> ^wengineer k43
echo ^w2 ^f-> ^wfield ops
echo ^w3 ^f-> ^wcovop sten
echo ^w4 ^f-> ^wcovop fg42
echo ^w5 ^f-> ^wcovop sniper
echo ^w6 ^f-> ^wsoldier panzer
echo ^w7 ^f-> ^wsoldier mortar
echo ^w8 ^f-> ^wsoldier mg42
echo ^w9 ^f-> ^wsoldier flamethrower"

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

 

 

so one only bound key (normally), and 3 keypresses to select any of 10 pre-coded classes ( F9 to activate, numpad 0 to go engi, slashkill and tapout, F9 again to return numpad to regular binds).

 

pretty dam slick if you ask me =D

 

anyone taking time to read and understand my code is welcome to use it just as always if yo use what i wrote and someone comments on how cool it is, please reference Connection Interrupted as being the guy who wrote it in the first place. don't use anything you don't understand; ask questions if you don't get how this is supposed to work.

Link to comment
Share on other sites

  • Administrators
not as in a one-button script -- i want a list of what the commands are for each class/weapon..

 

like this for etpub:

 

Engi smg single pistol = class e 1 1

Engi smg dual pistols = class e 1 2

Engi k43 single pistol = class e 2 1

Engi k43 dual pistol = class e 2 2

Engi shotgun single pistol = class e 3 1

Engi shotgun dual pistol = class e 3 2

Fop smg single pistol = class f 1 1

Fop smg dual pistol = class f 1 2

 

etc etc etc

 

but with the jaymod values, so i can alter my spawn selector script to have a working variant for jaymod.

 

Oh i am always jealous of KB users... my laptop Key pad is always short of keys. :(

Link to comment
Share on other sites

not as in a one-button script -- i want a list of what the commands are for each class/weapon..

 

like this for etpub:

 

Engi smg single pistol = class e 1 1

Engi smg dual pistols = class e 1 2

Engi k43 single pistol = class e 2 1

Engi k43 dual pistol = class e 2 2

Engi shotgun single pistol = class e 3 1

Engi shotgun dual pistol = class e 3 2

Fop smg single pistol = class f 1 1

Fop smg dual pistol = class f 1 2

 

etc etc etc

 

but with the jaymod values, so i can alter my spawn selector script to have a working variant for jaymod.

 

Oh i am always jealous of KB users... my laptop Key pad is always short of keys. :(

 

Standard USB keyboards are less than $5 at walmart.

Link to comment
Share on other sites

  • Administrators
not as in a one-button script -- i want a list of what the commands are for each class/weapon..

 

like this for etpub:

 

Engi smg single pistol = class e 1 1

Engi smg dual pistols = class e 1 2

Engi k43 single pistol = class e 2 1

Engi k43 dual pistol = class e 2 2

Engi shotgun single pistol = class e 3 1

Engi shotgun dual pistol = class e 3 2

Fop smg single pistol = class f 1 1

Fop smg dual pistol = class f 1 2

 

etc etc etc

 

but with the jaymod values, so i can alter my spawn selector script to have a working variant for jaymod.

 

Oh i am always jealous of KB users... my laptop Key pad is always short of keys. :(

 

Standard USB keyboards are less than $5 at walmart.

 

Can u carry them everywhere :P Can u make something portable and slim? that sticks at my laptop back side? Willing to pay 25$ :P if that thing is portable and goes into laptop bag easily.

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.