Forum
question about configproblem "r_drawviewmodel"
Created 2nd May 2009 @ 23:45
Add A Reply Pages: 1
hi,
i like to play my class with the command “r_drawviewmodel 0” that i dont see the weapon. i think its very nice for the mainweapon (slot1) but i i want to see my sec. weapon (slot2).
i’m not so good in write scripts and that stuff but i already tried a few things out where i thought maybe it works :p
the last thing was something like
bind 1 “slot1;r_drawviewmodel 0”
bind 2 “slot2;r_drawviewmodel 1”
but on the server there was only 1 choice; see all weapons or disable all 3. so anybody has a clue what i can do?
Put the following in your autoexec:
alias showweap1 “slot1; r_drawviewmodel 0”
alias hideweap2 “slot2; r_drawviewmodel 1”
alias showweap3 “slot3; r_drawviewmodel 0”
bind 1 “showweap1”
bind 2 “hideweap2”
bind 3 “showweap3”
And it’ll work. I’m sure there’re far more efficient ways of doing it, but I just got home from being out and it’s 08.49 am, so don’t hate me for it.
nice thank you!,
but is there a way that i can also bind this wo the mousewheel? somethimes i use the mousewheel when there are a lot of enemy cause i forgot that i have to use the num.keys :) so a bind on both would be perfect :D
Do you want the mousewheel to scroll through the weapons, or just to have mouseup be weapone and mousedown to be weaptwo?
hmm… It’s a lot easier to script when people use just the numbers, I have no idea how to script things to the mousewheel except things like +jump etc.
I’d advise you to get used to using the numbers, q and bind F to slot3 for melee – it’s a lot more accurate under pressure to switch and easier to script for
EDIT: How do you get Q to work with scripts like these?
no! using the mouse to select weapons is the ONLY way!
To get stuff like toggling weapons working with a crosshair script you basically have to rebind q every time you change weapons. Which is a bit messy, but perfectly doable.
mh this works for me:
bind “mwheelup” “slot1; r_drawviewmodel 0”
bind “mwheeldown” “slot2; r_drawviewmodel 1”
“Do you want the mousewheel to scroll through the weapons, or just to have mouseup be weapone and mousedown to be weaptwo?”
i would prefer to scroll through the weapons.
“I’d advise you to get used to using the numbers, q and bind F to slot3 for melee – it’s a lot more accurate under pressure to switch and easier to script for”
even under pressure the mousewheel is normally very accurate.but by the mouse i always have a finger free so its np. but if i wanna press 1;2 or 3 i normally press a number i dont want to use or even better i press 1 + 2 at once or i cant press a movekey cause i have to switch weapons. so for me it would be a lot easier to use the mousewheel :o
okay, I haven’t used mouse to scroll through weapons since a week after I bought the game, so this might rotate your weapons in the wrong direction, if you know what I mean. If this happens just shout and it’s easily fixable.
Anyhow:
//Weapon switching
alias “weapone” “slot1; r_drawviewmodel 0; alias _next melee; alias _prev weaptwo”
alias “weaptwo” “slot2; r_drawviewmodel 0; alias _next weapone; alias _prev melee”
alias “melee” “slot3; r_drawviewmodel 1; alias _next weaptwo; alias _prev weapone”
alias “_next” “melee”
alias “_prev” “weaptwo”
bind “1” “weapone”
bind “2” “weaptwo”
bind “3” “melee”
bind “mwheelup” “_next”
bind “mwheeldown” “_prev”
Put this into your autoexec.cfg:
This will support weapon switching with mousewheel, hide the primary weapon for every class and show the secondary and melee weapon for every class.
However, if you play Engy or Spy a lot, be told that you wont be able to switch to your build panel, destroy panel or disguise kit with the mouse wheel. Youll have to use the buttons 4 and 5.
nice!
thanks you two, exactly what i needed :)
tested on a server and works fine :D
finally i dont need to go in the options anymore and change it per hand :P
Add A Reply Pages: 1