Upvote Upvoted 0 Downvote Downvoted
Hide Primary weapon weapon with script
posted in Customization
1
#1
0 Frags +

Hello everyone,

i want to have a script or something thats hides my Primary weapon but not my secondary and melee. I already heared about something called "alias" and stuff, but I just can't figure it out. It would be quite helpful if someone could explain this to me in more detail.

Hello everyone,

i want to have a script or something thats hides my Primary weapon but not my secondary and melee. I already heared about something called "alias" and stuff, but I just can't figure it out. It would be quite helpful if someone could explain this to me in more detail.
2
#2
7 Frags +

alias w1 "slot1;r_drawviewmodel 0"
alias w2 "slot2;r_drawviewmodel 1"
alias w3 "slot3;r_drawviewmodel 1"
alias w4 "slot4;r_drawviewmodel 1"
alias w5 "slot5;r_drawviewmodel 1"

these w aliases combine your weapons (slotX) with the viewmodel command
then you just do

bind 1 w1
bind 2 w2
bind 3 w3
etc
(or whatever buttons you have them bound to)

there's other options like yttrium's installer which instead of using aliases will make custom viewmodel animations that move weapons you don't want to see off screen

alias w1 "slot1;r_drawviewmodel 0"
alias w2 "slot2;r_drawviewmodel 1"
alias w3 "slot3;r_drawviewmodel 1"
alias w4 "slot4;r_drawviewmodel 1"
alias w5 "slot5;r_drawviewmodel 1"

these w aliases combine your weapons (slotX) with the viewmodel command
then you just do

bind 1 w1
bind 2 w2
bind 3 w3
etc
(or whatever buttons you have them bound to)

there's other options like [url=https://www.teamfortress.tv/34834/yttriums-competitive-viewmodels]yttrium's installer[/url] which instead of using aliases will make custom viewmodel animations that move weapons you don't want to see off screen
3
#3
2 Frags +
Tobalias w1 "slot1;r_drawviewmodel 0"
alias w2 "slot2;r_drawviewmodel 1"
alias w3 "slot3;r_drawviewmodel 1"
alias w4 "slot4;r_drawviewmodel 1"
alias w5 "slot5;r_drawviewmodel 1"

these w aliases combine your weapons (slotX) with the viewmodel command
then you just do

bind 1 w1
bind 2 w2
bind 3 w3
etc
(or whatever buttons you have them bound to)

there's other options like yttrium's installer which instead of using aliases will make custom viewmodel animations that move weapons you don't want to see off screen

This is probably self-evident from the prior post, but you can add on as many commands as you like to each keybind. On pyro I turn off viewmodels, hitsounds, and set my viewmodel fov to -360 when I equip the flamethrower (so I can't see my own flames); and then when I take out my shotgun it turns all these things back on.

Also, just to clarify the "alias" command makes a custom command that you can bind keys to, or you can simply type said command directly into console. In tob's cfg, he created a command called "w1" which does both "slot1" and "r_drawviewmodel 0" simultaneously. It works the same way as the "+attack" command works (or any other built-in commands), you can bind a key to +attack, or you can just type that into console and your character will attack forever until you tell it to stop. You can also use this to make commands that will change maps for you, or execute server configs.

I like to use

alias scrim "rcon exec rgl_6s_5cp_scrim"

After putting that into my autoexec, everytime I type "scrim" into console it loads the rgl cfg for me. you could also bind this to a button if you have extra space, but I chose not to.

Hopefully this was relevant, and you understand why "alias" works now, because it unlocks a lot of customization.

[quote=Tob]alias w1 "slot1;r_drawviewmodel 0"
alias w2 "slot2;r_drawviewmodel 1"
alias w3 "slot3;r_drawviewmodel 1"
alias w4 "slot4;r_drawviewmodel 1"
alias w5 "slot5;r_drawviewmodel 1"

these w aliases combine your weapons (slotX) with the viewmodel command
then you just do

bind 1 w1
bind 2 w2
bind 3 w3
etc
(or whatever buttons you have them bound to)

there's other options like [url=https://www.teamfortress.tv/34834/yttriums-competitive-viewmodels]yttrium's installer[/url] which instead of using aliases will make custom viewmodel animations that move weapons you don't want to see off screen[/quote]

This is probably self-evident from the prior post, but you can add on as many commands as you like to each keybind. On pyro I turn off viewmodels, hitsounds, and set my viewmodel fov to -360 when I equip the flamethrower (so I can't see my own flames); and then when I take out my shotgun it turns all these things back on.

[i]Also, just to clarify the "alias" command makes a custom command that you can bind keys to, or you can simply type said command directly into console. In tob's cfg, he created a command called "w1" which does both "slot1" and "r_drawviewmodel 0" simultaneously. It works the same way as the "+attack" command works (or any other built-in commands), you can bind a key to +attack, or you can just type that into console and your character will attack forever until you tell it to stop. You can also use this to make commands that will change maps for you, or execute server configs.

I like to use

alias scrim "rcon exec rgl_6s_5cp_scrim"

After putting that into my autoexec, everytime I type "scrim" into console it loads the rgl cfg for me. you could also bind this to a button if you have extra space, but I chose not to.[/i]

Hopefully this was relevant, and you understand why "alias" works now, because it unlocks a lot of customization.
4
#4
0 Frags +

i'm retarded, ignore this.

i'm retarded, ignore this.
Please sign in through STEAM to post a comment.