View difference between Paste ID: dAhZGz1a and P6EbgxZX
SHOW: | | - or go back to the newest paste.
1
// This script allows crosshair and viewmodel settings to switch with the active weapon and with quickswitch
2
// 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
3
// 4 and 5 slot versions also available (4 slot includes watch support)
4
5
// Written, adapted, and modified by /u/genemilder (http://steamcommunity.com/id/seventy_one)
6
7
8
// ========== VIEWMODELS WHEN SWITCHING ==========
9
// Can edit r_drawviewmodel for weapon visibility on weapon switch
10
11
12
alias equip_primary   "slot1; r_drawviewmodel 0; qs_primary"
13
alias equip_secondary "slot2; r_drawviewmodel 1; qs_secondary"
14
alias equip_melee     "slot3; r_drawviewmodel 1; qs_melee"
15
16
17
// ========== QUICKSWITCH ==========
18
// Quickswitch works correctly when choosing weapons using only the keys detailed in binds section
19
20
21
alias qs_primary   "alias next equip_s2p; alias prev equip_m2p; alias primary equip_primary; alias secondary equip_s2p;       alias melee equip_m2p"
22
alias qs_secondary "alias next equip_m2s; alias prev equip_p2s; alias primary equip_p2s;     alias secondary equip_secondary; alias melee equip_m2s"
23
alias qs_melee     "alias next equip_p2m; alias prev equip_s2m; alias primary equip_p2m;     alias secondary equip_s2m;       alias melee equip_melee"
24
25
alias equip_p2s "equip_primary; alias switch equip_s2p; alias 12switch equip_s2p"
26
alias equip_p2m "equip_primary; alias switch equip_m2p; alias 12switch equip_s2p"
27
28
alias equip_s2m "equip_secondary; alias switch equip_m2s; alias 12switch equip_p2s"
29
alias equip_s2p "equip_secondary; alias switch equip_p2s; alias 12switch equip_p2s"
30
31
alias equip_m2p "equip_melee; alias switch equip_p2m; alias 12switch equip_s2p"
32
alias equip_m2s "equip_melee; alias switch equip_s2m; alias 12switch equip_s2p"
33
34
35
// ========== BINDS ==========
36
// If a slot is unavailable, anything bound to prev/next will not account for the unavailability (click twice to get to the available slot)
37
38
39
bind "mwheelup" "prev"
40
bind "mwheeldown" "next"
41
bind "1" "primary"
42
bind "2" "secondary"
43
bind "3" "melee"
44
bind "q" "switch"
45-
bind "mouse2" "12switch" // Swap between slot1 and slot2, goes to slot2 by default
45+
//bind "q" "12switch" // Swap between slot1 and slot2, goes to slot2 by default
46
47
48
// ========== Initialize aliases and report success in console ==========
49
50
51
r_drawviewmodel 1
52
equip_p2s
53
54
developer 1
55
echo "Success: Visual settings switch with weapon"
56
developer 0
57
58
59
// ========== SCRIPT OVERWRITES ==========
60
// To undo changes from the above script
61
62
63
//r_drawviewmodel 1
64
//bind "1" "slot1"
65
//bind "2" "slot2"
66
//bind "3" "slot3"
67
//bind "MWHEELUP" "invprev"
68
//bind "MWHEELDOWN" "invnext"
69-
//bind "q" "lastinv"
69+
//bind "q" "lastinv"