Upvote Upvoted 3 Downvote Downvoted
Toggle viewmodel off when changing weapons
posted in Q/A Help
1
#1
2 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
1 Frags +

wtf is incrementvar

bind "MWHEELUP" "slot1;r_drawviewmodel 1"
bind "MWHEELDOWN" "slot2;r_drawviewmodel 1"
bind q "slot3;r_drawviewmodel 1"
bind <key> "r_drawviewmodel 0"

do whatever with q/your third/melee slot. i just edited my soldier config.

wtf is incrementvar

bind "MWHEELUP" "slot1;r_drawviewmodel 1"
bind "MWHEELDOWN" "slot2;r_drawviewmodel 1"
bind q "slot3;r_drawviewmodel 1"
bind <key> "r_drawviewmodel 0"

do whatever with q/your third/melee slot. i just edited my soldier config.
3
#3
2 Frags +

Thank you very much. That's exactly what i was looking for. Thank you :)

EDIT : I just changed the slot1 and slot2 with the invprev and with the invnext, so i don't need to press Q anymore for the melee

Thank you very much. That's exactly what i was looking for. Thank you :)

EDIT : I just changed the slot1 and slot2 with the invprev and with the invnext, so i don't need to press Q anymore for the melee
4
#4
0 Frags +

incrementvar r_drawviewmodel 0 1 1, but that's a terrible way of doing it, use the code above

incrementvar r_drawviewmodel 0 1 1, but that's a terrible way of doing it, use the code above
5
#5
2 Frags +

That's what i did :)

That's what i did :)
Please sign in through STEAM to post a comment.