Upvote Upvoted 1 Downvote Downvoted
Toggle viewmodel off when changing weapons
1
#1
0 Frags +

Alright. I have a little hard time creating an script ...

Im trying to create a script that makes the viewmodel off when pressing an button, but that makes the viewmodel back when changing weapons with the mouse wheel.

bind r "viewmodel_fov 0"
alias scroll_up "incrementvar r_drawviewmodel 1 1 0"
alias scroll_down "incrementvar r_drawviewmodel 1 1 0"
bind MWHEELUP "scroll_up"
bind MWHEELDOWN "scoll_down"

It doesn't work, but i don't know how to fix it

Any help ?

Alright. I have a little hard time creating an script ...

Im trying to create a script that makes the viewmodel off when pressing an button, but that makes the viewmodel back when changing weapons with the mouse wheel.

bind r "viewmodel_fov 0"
alias scroll_up "incrementvar r_drawviewmodel 1 1 0"
alias scroll_down "incrementvar r_drawviewmodel 1 1 0"
bind MWHEELUP "scroll_up"
bind MWHEELDOWN "scoll_down"

It doesn't work, but i don't know how to fix it

Any help ?
2
#2
0 Frags +

moved from requests forum

moved from requests forum
3
#3
0 Frags +

Assuming I read your idea correctly you should just bind mwheelup to r_drawviewmodel 1. But because that sounds way too simple, your order of incrementvar is wrong. I think it should be 0 1 1 instead of 1 0 1.

Assuming I read your idea correctly you should just bind mwheelup to r_drawviewmodel 1. But because that sounds way too simple, your order of incrementvar is wrong. I think it should be 0 1 1 instead of 1 0 1.
4
#4
0 Frags +

I used to use something like that, I had movement keys also do "r_drawviewmodel 0" and weapon switches do "r_drawviewmodel 1".

The goal was to see what weapon was being pulled out, but not see it when fighting.

If that's what you're looking for then Gek is right, all you need is "r_drawviewmodel 1"

I used to use something like that, I had movement keys also do "r_drawviewmodel 0" and weapon switches do "r_drawviewmodel 1".

The goal was to see what weapon was being pulled out, but not see it when fighting.

If that's what you're looking for then Gek is right, all you need is "r_drawviewmodel 1"
5
#5
-1 Frags +

alias scattergun "slot1;r_drawviewmodel 0;viewmodel_fov 90;MW1"
alias pistol "slot2;r_drawviewmodel 1;viewmodel_fov 90;MW2"
alias bat "slot3;r_drawviewmodel 1;viewmodel_fov 90;MW3"

alias R1 "pistol"
alias R2 "scattergun"
alias MW1 "bind mwheelup bat;bind mwheeldown pistol;bind r R1"
alias MW2 "bind mwheelup scattergun;bind mwheeldown bat;bind r R2"
alias MW3 "bind mwheelup pistol;bind mwheeldown scattergun"

bind 1 scattergun
bind 2 pistol
bind 3 bat
bind "4" "r_drawviewmodel 1"
bind 5 slot5

This should work for you, just change the bind r to whatever key you want for the quick switch.

alias scattergun "slot1;r_drawviewmodel 0;viewmodel_fov 90;MW1"
alias pistol "slot2;r_drawviewmodel 1;viewmodel_fov 90;MW2"
alias bat "slot3;r_drawviewmodel 1;viewmodel_fov 90;MW3"

alias R1 "pistol"
alias R2 "scattergun"
alias MW1 "bind mwheelup bat;bind mwheeldown pistol;bind r R1"
alias MW2 "bind mwheelup scattergun;bind mwheeldown bat;bind r R2"
alias MW3 "bind mwheelup pistol;bind mwheeldown scattergun"

bind 1 scattergun
bind 2 pistol
bind 3 bat
bind "4" "r_drawviewmodel 1"
bind 5 slot5

This should work for you, just change the bind r to whatever key you want for the quick switch.
Please sign in through STEAM to post a comment.