I wrote a script that tells you what weapon you are wielding, binds for rocket jumping and quick switch attacks for Rocket Launcher and Rail Gun that also switches back to the weapon you were wielding before when you release the key. If you want to instantly repeat fire, just hold the key.
If the files or folders doesn't exist you just have to create them.
Autoexec.cfg
The exec line will work just fine if you add it to the bottom of your existing autoexec file. If you want it to work well with the QL Ranks script, just add it right above that. The whole thing can be initialized at any time by simply executing the scripts file. Adding it to autoexec will only make it persistent upon restarting the game.
Scripts.cfg
Code:
//Scripts
//aliases
alias +fi_rocketjump "+moveup; wait; +attack; wait; -moveup"
alias -fi_rocketjump "-attack"
alias +fi_quickrocket "set cg_weaponConfig_rl vstr fi_null; weapon 5; wait 2; +attack"
alias -fi_quickrocket "-attack; wait; vstr fi_back; set cg_weaponConfig_rl vstr fi_weapon_rl"
alias +fi_quickrail "set cg_weaponConfig_rg vstr fi_null; weapon 7; wait 2; +attack"
alias -fi_quickrail "-attack; wait; vstr fi_back; set cg_weaponConfig_rg vstr fi_weapon_rg"
//binds
bind x "+fi_rocketjump"
bind y "+fi_quickrocket"
bind z "+fi_quickrail"
//cvars
seta cg_hudFiles "ui/weapon.cfg"
seta cg_weaponConfig_g "set fi_weapon 1; set fi_back weapon 1"
seta cg_weaponConfig_mg "set fi_weapon 2; set fi_back weapon 2"
seta cg_weaponConfig_sg "set fi_weapon 3; set fi_back weapon 3"
seta cg_weaponConfig_gl "set fi_weapon 4; set fi_back weapon 4"
seta cg_weaponConfig_rl "set fi_weapon 5; set fi_back weapon 5"
seta cg_weaponConfig_lg "set fi_weapon 6; set fi_back weapon 6"
seta cg_weaponConfig_rg "set fi_weapon 7; set fi_back weapon 7"
seta cg_weaponConfig_pg "set fi_weapon 8; set fi_back weapon 8"
seta cg_weaponConfig_bfg "set fi_weapon 9; set fi_back weapon 9"
seta cg_weaponConfig_gh "set fi_weapon 10; set fi_back weapon 10"
seta cg_weaponConfig_ng "set fi_weapon 11; set fi_back weapon 11"
seta cg_weaponConfig_pl "set fi_weapon 12; set fi_back weapon 12"
seta cg_weaponConfig_cg "set fi_weapon 13; set fi_back weapon 13"
seta cg_weaponConfig "set fi_weapon 0"
seta fi_null ""
seta fi_weapon "2"
seta fi_back "weapon 2"
seta fi_weapon_rl "set fi_weapon 5; set fi_back weapon 5"
seta fi_weapon_rg "set fi_weapon 7; set fi_back weapon 7"
//calibrate
weapon 2
fi_weapon is the weapon you are wielding.
fi_back is the command used to go back to the previous weapon when you quick attack.
cg_weaponConfigs need to be modified or cleared upon quick switch, otherwise they will set themselves to the weapon to go back to.
The text won't change when you quick switch. If you want the text to change, add "set fi_weapon 5" after "weapon 5" in the +quickrocket alias. The same can be done for the +quickrail alias with a minor change to the number.
ui\weapon.cfg
Code:
// ========== Destiny Concept =====================================================
// Version 0.0.1
{
loadMenu { "ui/hud.menu" }
loadMenu { "ui/weapon.menu" }
}
ui\weapon.menu
Code:
// ========== Destiny Weapon ======================================================
// Version 0.0.1
#include "ui/menudef.h"
// ========== Variables ===========================================================
#define def_menu fullScreen MENU_FALSE visible MENU_TRUE
#define def_item visible MENU_TRUE decoration
#define var_g .2 1 1
#define var_mg 1 1 .2
#define var_sg 1 .5 .2
#define var_gl .1 .7 .1
#define var_rl 1 .2 .2
#define var_lg 1 1 .75
#define var_rg .1 1 .1
#define var_pg 1 .2 1
#define var_bfg .2 .3 1
#define var_gh 1 1 1
#define var_ng .2 1 1
#define var_pl 1 .2 .5
#define var_cg .8 .8 .8
#define var_opaque 1
#define var_weapon .25
// ========== Weapon ==============================================================
menuDef {
def_menu
name "WeaponArea"
rect 5 460 100 10
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {1}
text "Gauntlet"
forecolor var_g var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {2}
text "Machine Gun"
forecolor var_mg var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {3}
text "Shotgun"
forecolor var_sg var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {4}
text "Grenade Launcher"
forecolor var_gl var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {5}
text "Rocket Launcher"
forecolor var_rl var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {6}
text "Lightning Gun"
forecolor var_lg var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {7}
text "Rail Gun"
forecolor var_rg var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {8}
text "Plasma Gun"
forecolor var_pg var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {9}
text "BFG"
forecolor var_bfg var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {10}
text "Grappling Hook"
forecolor var_gh var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {11}
text "Nailgun"
forecolor var_ng var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {12}
text "Proximity Mine"
forecolor var_pl var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
itemDef {
def_item
cvarTest "fi_weapon"
showCvar {13}
text "Chain Gun"
forecolor var_cg var_opaque
textstyle ITEM_TEXTSTYLE_NORMAL
textscale var_weapon
}
}
The fi_weapon cvarTest can be used for almost any HUD element, like custom crosshairs, tailored ammo bars and other indicators.
Update: Just tested this online and it seems to be working with ping 70 and below. Not tested with higher ping yet.