Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This script allows crosshair and viewmodel settings to switch with the active weapon and with quickswitch
- // Only the first 3 slots will be tracked by the scroll wheel and quickswitch, so be cognizant of that when using this script with engineer or spy
- // 4 and 5 slot versions also available (4 slot includes watch support)
- // Written, adapted, and modified by /u/genemilder (http://steamcommunity.com/id/seventy_one)
- // ========== VIEWMODELS WHEN SWITCHING ==========
- // Can edit r_drawviewmodel for weapon visibility on weapon switch
- alias equip_primary "slot1; r_drawviewmodel 0; qs_primary"
- alias equip_secondary "slot2; r_drawviewmodel 1; qs_secondary"
- alias equip_melee "slot3; r_drawviewmodel 1; qs_melee"
- // ========== QUICKSWITCH ==========
- // Quickswitch works correctly when choosing weapons using only the keys detailed in binds section
- alias qs_primary "alias next equip_s2p; alias prev equip_m2p; alias primary equip_primary; alias secondary equip_s2p; alias melee equip_m2p"
- alias qs_secondary "alias next equip_m2s; alias prev equip_p2s; alias primary equip_p2s; alias secondary equip_secondary; alias melee equip_m2s"
- alias qs_melee "alias next equip_p2m; alias prev equip_s2m; alias primary equip_p2m; alias secondary equip_s2m; alias melee equip_melee"
- alias equip_p2s "equip_primary; alias switch equip_s2p; alias 12switch equip_s2p"
- alias equip_p2m "equip_primary; alias switch equip_m2p; alias 12switch equip_s2p"
- alias equip_s2m "equip_secondary; alias switch equip_m2s; alias 12switch equip_p2s"
- alias equip_s2p "equip_secondary; alias switch equip_p2s; alias 12switch equip_p2s"
- alias equip_m2p "equip_melee; alias switch equip_p2m; alias 12switch equip_s2p"
- alias equip_m2s "equip_melee; alias switch equip_s2m; alias 12switch equip_s2p"
- // ========== 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 "q" "switch"
- //bind "q" "12switch" // Swap between slot1 and slot2, goes to slot2 by default
- // ========== Initialize aliases and report success in console ==========
- r_drawviewmodel 1
- equip_p2s
- 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 "MWHEELUP" "invprev"
- //bind "MWHEELDOWN" "invnext"
- //bind "q" "lastinv"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement