r/Tf2Scripts • u/Glyr_ • Apr 26 '18
Script I just made this handy viewmodel script
alias oof "r_drawviewmodel 0"
alias Primary "slot1; oof" alias Secondary "slot2; oof" alias Meele "slot3; r_drawviewmodel 1"
bind 1 "Primary" bind 2 "Secondary" bind 3 "Meele"
bind f "+inspect; r_drawviewmodel 1"
alias visible "r_drawviewmodel 1; bind CAPSLOCK "invisible"; alias oof "r_drawviewmodel 1"" alias invisible "r_drawviewmodel 0; bind CAPSLOCK "visible"; alias oof "r_drawviewmodel 0"" bind CAPSLOCK "invisible"
Here it is. So, there are 2 settings, one where all weapons are visible, and one where only your meele is. You can toggle between them with capslock. Advice would be appreciated, as this is the first mini-script i've created. Thanks :)
View all comments
Show parent comment
1
u/-BrokeN- May 25 '18
It's not just about being neat, quotation marks inside of quotations literally won't work - it will break your script. If you wrote
"echo "hello";echo "how are you?"", then what the console will read is this:"echo ", followed by";echo ", and finally""- every 2nd quotation mark will end and encapsulate that line of text, so make sure to place them correctly.For it to work correctly, you'd instead write this:
"echo hello;echo how are you?"