r/Tf2Scripts • • Aug 13 '17

Request Viewmodel hide script

I need help with a script to auto-hide my primary weapon on sniper only. any help? Thank you

1 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/bythepowerofscience Aug 16 '17

Here's the code to enter formatted correctly:

sniper.cfg (BTW to make a cfg file just make a txt file and change its extension from .txt to .cfg. It'll give you a warning but it's fine.)

alias "weaponone" "slot1;r_drawviewmodel 0"  
alias "weapontwo" "slot2;r_drawviewmodel 1"  
alias "weaponthree" "slot3;r_drawviewmodel 1"  
bind 1 weaponone  
bind 2 weapontwo  
bind 3 weaponthree  

reset.cfg

alias "weaponone" "slot1;r_drawviewmodel 1"  
alias "weapontwo" "slot2;r_drawviewmodel 1"  
alias "weaponthree" "slot3;r_drawviewmodel 1"  
bind 1 weaponone  
bind 2 weapontwo  
bind 3 weaponthree

You can customize them as you wish, as well. r_drawviewmodel 1 means it's visible while r_drawviewmodel 0 means it's invisible.