Class selection script
From ETQWPro Wiki Pages
Contents |
Description
Features
This script allows you to choose classes in game, in vanilla or etqwpro.
- pressing certain key a couple of times changes weapon you will use to spawn.
- changing classes will also reset weapon selection
- By default it uses numeric pad as selection:
- 1 - Soldier / Aggressor
- 2 - Medic / Technician
- 3 - Engeneer / Constructor
- 4 - Field Ops / Oppressor
- 5 - Covert Ops / Infiltrator
- key F8 used to commit suicide
Adjust binds to suit your needs!
Known limitations
- Does not work when moving from spect to a team and waiting for respawn, you have to choose class in limbo menu, but this could be expanded, its not a bug
- Does not work in vehicles, you would have to expand it for each vehicle, we decided not to.
Installation
Save as classchoose.cfg in base/ directory where you have installed game, then in your autoexec.cfg for each mod add
exec classchoose.cfg
Check in console for echo message
Classchoose loaded
if its there, its loaded properly.
Script
///////////////////////////////////////////////////////////////////////////////////////////////// // // Class Selection Script // there are few things youc an adjust: // 1 - binds, most of them are on numeric keyboard // 2 - colors // 3 - notification mode // 4 - spawn point (vanilla), at the end of th script bind "F8" "kill" "" "default" bind "kp_ins" "kill" "" "default" bind "F5" "clientTeam gdf; vstr classreset" "" "default" bind "F6" "clientTeam strogg; vstr classreset" "" "default" bind "F7" "clientTeam spectator; vstr classreset" "" "default" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Notification // define if you want as chatline (invisible for others) or say notificatios of what you choose // uncomment only one line, and comment the others, by default info is for your own chatline seta ClassInfo "addchatline" //seta ClassInfo "sayTeam" //seta ClassInfo "sayFireteam" //seta ClassInfo "say" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Color Messages // ajust colors to suit your needs // Color Codes // 1 - Red // 2 - Green // 3 - Yellow // 4 - Blue // 5 - Cyan // 6 - Magenta // 7 – White // 8 - Gray // 9 - Black seta Soldier1 "^3SOLDIER - Assault Rifle" seta Soldier2 "^3SOLDIER - Rocket Launcher" seta Soldier3 "^3SOLDIER - GPMG" seta Soldier4 "^3SOLDIER - Shotgun" seta Medic1 "^3MEDIC - Assault Rifle" seta Medic2 "^3MEDIC - Shotgun" seta Engineer1 "^3ENGINEER - Assault Rifle" seta Engineer2 "^3ENGINEER - Shotgun" seta Engineer3 "^3ENGINEER - Grenade Launcher" seta FieldOps1 "^3FIELD OPS - Assault Rifle" seta FieldOps2 "^3FIELD OPS - Scoped Assault Rifle" seta CovertOps1 "^3COVERT OPS - Scoped Assault Rifle" seta CovertOps2 "^3COVERT OPS - Sniper Rifle" seta Aggressor1 "^3AGGRESSOR - Lacerator" seta Aggressor2 "^3AGGRESSOR - Obliterator" seta Aggressor3 "^3AGGRESSOR - Hyperblaster" seta Aggressor4 "^3AGGRESSOR - Nailgun" seta Technician1 "^3TECHNICIAN - Lacerator" seta Technician2 "^3TECHNICIAN - Nailgun" seta Constructor1 "^3CONSTRUCTOR - Lacerator" seta Constructor2 "^3CONSTRUCTOR - Nailgun" seta Constructor3 "^3CONSTRUCTOR - Plasma Launcher" seta Oppressor1 "^3OPPRESSOR - Lacerator" seta Oppressor2 "^3OPPRESSOR - Accurized Lacerator" seta Infiltrator1 "^3INFILTRATOR - Accurized Lacerator" seta Infiltrator2 "^3INFILTRATOR - Railgun" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Class reset fix seta classreset "seta sol0 vstr sol1; seta med0 vstr med1; seta eng0 vstr eng1; seta fop0 vstr fop1; seta cov0 vstr cov1; seta agg0 vstr agg1; seta tech0 vstr tech1; seta con0 vstr con1; seta opp0 vstr opp1; seta inf0 vstr inf1" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Soldier seta sol1 "clientClass Soldier 0; $ClassInfo $Soldier1; seta sol0 vstr sol2; seta med0 $med1 ; seta eng0 $eng1; seta fop0 $fop1; seta cov0 $cov1" seta sol2 "clientClass Soldier 1; $ClassInfo $Soldier2; seta sol0 vstr sol3" seta sol3 "clientClass Soldier 2; $ClassInfo $Soldier3; seta sol0 vstr sol4" seta sol4 "clientClass Soldier 3; $ClassInfo $Soldier4; seta sol0 vstr sol1" seta sol0 "vstr sol1" bind kp_end "vstr sol0" "" "soldier" bind kp_end "vstr sol0" "" "medic" bind kp_end "vstr sol0" "" "engineer" bind kp_end "vstr sol0" "" "fieldops" bind kp_end "vstr sol0" "" "covertops" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Medic seta med1 "clientClass Medic 0; $ClassInfo $Medic1; seta med0 vstr med2; seta sol0 $sol1 ; seta eng0 $eng1; seta fop0 $fop1; seta cov0 $cov1" seta med2 "clientClass Medic 1; $ClassInfo $Medic2; seta med0 vstr med1" seta med0 "vstr med1" bind kp_downarrow "vstr med0" "" "soldier" bind kp_downarrow "vstr med0" "" "medic" bind kp_downarrow "vstr med0" "" "engineer" bind kp_downarrow "vstr med0" "" "fieldops" bind kp_downarrow "vstr med0" "" "covertops" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Engineer seta eng1 "clientClass Engineer 0; $ClassInfo $Engineer1; seta eng0 vstr eng2; seta med0 $med1; seta sol0 $sol1; seta fop0 $fop1; seta cov0 $cov1" seta eng2 "clientClass Engineer 1; $ClassInfo $Engineer2; seta eng0 vstr eng3" seta eng3 "clientClass Engineer 2; $ClassInfo $Engineer3; seta eng0 vstr eng1" seta eng0 "vstr eng1" bind kp_pgdn "vstr eng0" "" "soldier" bind kp_pgdn "vstr eng0" "" "medic" bind kp_pgdn "vstr eng0" "" "engineer" bind kp_pgdn "vstr eng0" "" "fieldops" bind kp_pgdn "vstr eng0" "" "covertops" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Field Ops seta fop1 "clientClass FieldOps 0; $ClassInfo $FieldOps1; seta fop0 vstr fop2; seta med0 $med1 ; seta eng0 $eng1; seta sol0 $sol1; seta cov0 $cov1" seta fop2 "clientClass FieldOps 1; $ClassInfo $FieldOps2; seta fop0 vstr fop1" seta fop0 "vstr fop1" bind kp_leftarrow "vstr fop0" bind kp_leftarrow "vstr fop0" "" "soldier" bind kp_leftarrow "vstr fop0" "" "medic" bind kp_leftarrow "vstr fop0" "" "engineer" bind kp_leftarrow "vstr fop0" "" "fieldops" bind kp_leftarrow "vstr fop0" "" "covertops" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Covert Ops seta cov1 "clientClass CovertOps 0; $ClassInfo $CovertOps1; seta cov0 vstr cov2; seta med0 $med1 ; seta eng0 $eng1; seta fop0 $fop1; seta sol0 $sol1" seta cov2 "clientClass CovertOps 1; $ClassInfo $CovertOps2; seta cov0 vstr cov1" seta cov0 "vstr cov1" bind kp_5 "vstr cov0" bind kp_5 "vstr cov0" "" "soldier" bind kp_5 "vstr cov0" "" "medic" bind kp_5 "vstr cov0" "" "engineer" bind kp_5 "vstr cov0" "" "fieldops" bind kp_5 "vstr cov0" "" "covertops" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Aggressor seta agg1 "clientClass Aggressor 0; $ClassInfo $Aggressor1; seta agg0 vstr agg2; seta tech0 $tech1; seta con0 $con1; seta opp0 $opp1; seta inf0 $inf1" seta agg2 "clientClass Aggressor 1; $ClassInfo $Aggressor2; seta agg0 vstr agg3" seta agg3 "clientClass Aggressor 2; $ClassInfo $Aggressor3; seta agg0 vstr agg4" seta agg4 "clientClass Aggressor 3; $ClassInfo $Aggressor4; seta agg0 vstr agg1" seta agg0 "vstr agg1" bind kp_end "vstr agg0" "" "aggressor" bind kp_end "vstr agg0" "" "technician" bind kp_end "vstr agg0" "" "constructor" bind kp_end "vstr agg0" "" "oppressor" bind kp_end "vstr agg0" "" "infiltrator" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Technician seta tech1 "clientClass Technician 0; $ClassInfo $Technician1; seta tech0 vstr tech2; seta agg0 $agg1; seta con0 $con1; seta opp0 $opp1; seta inf0 $inf1" seta tech2 "clientClass Technician 1; $ClassInfo $Technician2; seta tech0 vstr tech1" seta tech0 "vstr tech1" bind kp_downarrow "vstr tech0" "" "aggressor" bind kp_downarrow "vstr tech0" "" "technician" bind kp_downarrow "vstr tech0" "" "constructor" bind kp_downarrow "vstr tech0" "" "oppressor" bind kp_downarrow "vstr tech0" "" "infiltrator" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Constructor seta con1 "clientClass Constructor 0; $ClassInfo $Constructor1; seta con0 vstr con2; seta tech0 $tech1; seta agg0 $agg1; seta opp0 $opp1; seta inf0 $inf1" seta con2 "clientClass Constructor 1; $ClassInfo $Constructor2; seta con0 vstr con3" seta con3 "clientClass Constructor 2; $ClassInfo $Constructor3; seta con0 vstr con1" seta con0 "vstr con1" bind kp_pgdn "vstr con0" "" "aggressor" bind kp_pgdn "vstr con0" "" "technician" bind kp_pgdn "vstr con0" "" "constructor" bind kp_pgdn "vstr con0" "" "oppressor" bind kp_pgdn "vstr con0" "" "infiltrator" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Oppressor seta opp1 "clientClass Oppressor 0; $ClassInfo $Oppressor1; seta opp0 vstr opp2; seta tech0 $tech1; seta con0 $con1; seta agg0 $agg1; seta inf0 $inf1" seta opp2 "clientClass Oppressor 1; $ClassInfo $Oppressor2; seta opp0 vstr opp1" seta opp0 "vstr opp1" bind kp_leftarrow "vstr opp0" "" "aggressor" bind kp_leftarrow "vstr opp0" "" "technician" bind kp_leftarrow "vstr opp0" "" "constructor" bind kp_leftarrow "vstr opp0" "" "oppressor" bind kp_leftarrow "vstr opp0" "" "infiltrator" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Infiltrator seta inf1 "clientClass Infiltrator 0; $ClassInfo $Infiltrator1; seta inf0 vstr inf2; seta tech0 $tech1; seta con0 $con1; seta opp0 $opp1; seta agg0 $agg1" seta inf2 "clientClass Infiltrator 1; $ClassInfo $Infiltrator2; seta inf0 vstr inf1" seta inf0 "vstr inf1" bind kp_5 "vstr inf0" "" "aggressor" bind kp_5 "vstr inf0" "" "technician" bind kp_5 "vstr inf0" "" "constructor" bind kp_5 "vstr inf0" "" "oppressor" bind kp_5 "vstr inf0" "" "infiltrator" ///////////////////////////////////////////////////////////////////////////////////////////////// // // Spawn Point seta SpawnPointNext "^aSpawn - Next" seta SpawnPointPrev "^aSpawn - Prev" seta SpawnPointDefa "^aSpawn - Frontline" seta SpawnPointBase "^aSpawn - Base" bind kp_home "setSpawnPoint prev; $ClassInfo $SpawnPointPrev;" "" "default" // selects one spawn back from the player current selection bind kp_uparrow "setSpawnPoint default; $ClassInfo $SpawnPointDefa;" "" "default" // selects the current front-line spawn point bind kp_rightarrow "setSpawnPoint base; $ClassInfo $SpawnPointBase;" "" "default" // spawn point to the main base (Command Center/Domination Hub) bind kp_pgup "setSpawnPoint next; $ClassInfo $SpawnPointNext;" "" "default" //selects one spawn ahead of the player current selection ///////////////////////////////////////////////////////////////////////////////////////////////// // // End of script echo "^fClassChoose Loaded ver ^70^8.^74" // leave next empty line on purpose
