Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec crosshairswitcher/disable; spy
- // This script allows crosshair and viewmodel settings to switch with the active weapon and with quickswitch
- // The first 4 slots will be tracked by the scroll wheel and quickswitch, so only use this script with the spy
- // 3 and 5 slot versions also available
- // Written, adapted, and modified by /u/genemilder (http://steamcommunity.com/id/seventy_one)
- // Further customized for /u/Warm_Dry_Blanket by /u/CAPSLOCK_USERNAME
- cl_autoreload 0
- //[ ========== VIEWMODELS & DISGUISING WHEN ATTACKING ==========
- // Can edit r_drawviewmodel below for whether viewmodels are turned on or off when the current weapon is fired
- // Can add or remove disg_tog on the -vm_ aliases to determine ability to redisguise after attacking (activate toggle_disg to turn on or off)
- alias +vm_primary "+attack; r_drawviewmodel 1; spec_next"
- alias -vm_primary "-attack; r_drawviewmodel 1; disg_tog"
- alias +vm_secondary "-attack; r_drawviewmodel 1; spec_next" //Reversed from normal. Will constantly sap unless holding M1
- alias -vm_secondary "+attack; r_drawviewmodel 1"
- alias +vm_melee "+attack; r_drawviewmodel 1; spec_next"
- alias -vm_melee "-attack; r_drawviewmodel 1; disg_tog"
- alias +vm_slot4 "+attack; r_drawviewmodel 1; spec_next"
- alias -vm_slot4 "-attack; r_drawviewmodel 1"
- alias +vm_watch "+attack2; r_drawviewmodel 1; spec_prev"
- alias -vm_watch "-attack2; r_drawviewmodel 1"
- alias primary_vm "alias +vm_attack +vm_primary; alias -vm_attack -vm_primary; viewmodel_fov 110"
- alias secondary_vm "alias +vm_attack +vm_secondary; alias -vm_attack -vm_secondary; viewmodel_fov 110"
- alias melee_vm "alias +vm_attack +vm_melee; alias -vm_attack -vm_melee; viewmodel_fov 90"
- alias slot4_vm "alias +vm_attack +vm_slot4; alias -vm_attack -vm_slot4"
- alias "toggle_disg" "disg_on"
- alias "disg_on" "alias disg_tog lastdisguise; alias toggle_disg disg_off; say_team Auto-disguise ON"
- alias "disg_off" "alias disg_tog ; alias toggle_disg disg_on; say_team Auto-disguise OFF"
- //]
- //[ ========== CROSSHAIRS AND VIEWMODELS WHEN SWITCHING ==========
- // Can edit _file for crosshair type and _scale for size
- // Can edit r_drawviewmodel for weapon visibility on weapon switch
- // Comment/uncomment relevant section if you want crosshairs to switch with active weapon
- alias xhair_primary "cl_crosshair_file crosshair7; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
- alias xhair_secondary "cl_crosshair_file crosshair3; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
- alias xhair_melee "cl_crosshair_file crosshair5; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
- alias xhair_slot4 "cl_crosshair_file crosshair5; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
- // Choice 1 ----- (crosshair switching enabled) -----
- //alias equip_primary "slot1; r_drawviewmodel 1; primary_vm; qs_primary; xhair_primary"
- //alias equip_secondary "slot2; r_drawviewmodel 1; secondary_vm; qs_secondary; xhair_secondary; +attack"
- //alias equip_melee "slot3; r_drawviewmodel 1; melee_vm; qs_melee; xhair_melee"
- //alias equip_slot4 "slot4; r_drawviewmodel 1; slot4_vm; qs_slot4; xhair_slot4"
- // Choice 2 ----- (crosshair switching disabled) -----
- alias equip_primary "slot1; r_drawviewmodel 1; primary_vm; qs_primary"
- alias equip_secondary "slot2; r_drawviewmodel 1; secondary_vm; qs_secondary; +attack"
- alias equip_melee "slot3; r_drawviewmodel 1; melee_vm; qs_melee"
- alias equip_slot4 "slot4; r_drawviewmodel 1; slot4_vm; qs_slot4"
- //]
- //[ ========== QUICKSWITCH ==========
- // Quickswitch works correctly when choosing weapons using only the keys detailed in binds section
- alias qs_primary "alias next equip_secondary; alias prev equip_slot4; switch_set; alias switch_set alias switch equip_primary; alias 13switch equip_melee"
- alias qs_secondary "alias next equip_melee; alias prev equip_primary; switch_set; alias switch_set alias switch equip_secondary; alias 13switch equip_primary"
- alias qs_melee "alias next equip_slot4; alias prev equip_secondary; switch_set; alias switch_set alias switch equip_melee; alias 13switch equip_primary"
- alias qs_slot4 "alias next equip_primary; alias prev equip_melee; switch_set; alias switch_set alias switch equip_slot4; alias 13switch equip_primary"
- //]
- //[ ========== MULTI-BUTTON WEAPON SWAP
- alias wep0 "alias +swap1 +wep1;alias +swap2 +wep2;alias -swap1 -wep1;alias -swap2 -wep2; equip_primary"
- alias +wep1 "equip_primary;alias +swap2 +wep3"
- alias -wep1 "alias +swap2 +wep2"
- alias +wep2 "equip_melee;alias +swap1 +wep3"
- alias -wep2 "alias +swap1 +wep1"
- alias +wep3 "equip_secondary;+attack;alias +swap1 donothing;alias +swap2 donothing;alias -swap1 -wep3_1;alias -swap2 -wep3_2"
- alias -wep3_1 "alias -swap2 wep0;alias +swap1 +wep3"
- alias -wep3_2 "alias -swap1 wep0;alias +swap2 +wep3"
- alias donothing ""
- wep0
- //]
- //[ ========== BINDS ==========
- // If a slot is unavailable, anything bound to prev/next will not account for the unavailability (click twice to get to the available slot)
- //bind "mwheelup" "prev"
- //bind "mwheeldown" "next"
- //bind "1" "primary"
- //bind "2" "secondary"
- //bind "3" "melee"
- //bind "4" "wslot4"
- //bind "q" "switch"
- bind "q" "13switch" // Swap between slot1 and slot3, goes to slot10 by default
- bind "rshift" "toggle_disg"
- bind "mouse1" "+vm_attack"
- bind "mouse2" "+vm_watch"
- alias +autosap equip_secondary //bind something to +autosap if you want a separate key for it...
- alias -autosap switch
- bind mouse5 +swap1 //mouse5 for primary, mouse4 for secondary, or hold both for autosap
- bind mouse4 +swap2
- bind "KP_END" "disguise 1 -1"
- bind "KP_DOWNARROW" "disguise 3 -1"
- bind "KP_PGDN" "disguise 7 -1"
- bind "KP_LEFTARROW" "disguise 4 -1"
- bind "KP_5" "disguise 6 -1"
- bind "KP_RIGHTARROW" "disguise 9 -1"
- bind "KP_HOME" "disguise 5 -1"
- bind "KP_UPARROW" "disguise 2 -1"
- bind "KP_PGUP" "disguise 8 -1"
- //]
- //[ ========== Initialize aliases and report success in console ==========
- r_drawviewmodel 1
- equip_primary
- alias switch equip_secondary
- disg_off
- developer 1
- echo "Success: Visual settings switch with weapon"
- developer 0
- //]
- //[ ========== SCRIPT OVERWRITES ==========
- // To undo changes from the above script
- //r_drawviewmodel 1
- //bind "1" "slot1"
- //bind "2" "slot2"
- //bind "3" "slot3"
- //bind "4" "slot4"
- //bind "MWHEELUP" "invprev"
- //bind "MWHEELDOWN" "invnext"
- //bind "q" "lastinv"
- //unbind "RSHIFT"
- //bind "MOUSE1" "+attack"
- //bind "MOUSE2" "+attack2"
- //]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement