Toggle Crouch
#1
Hello everybody,

I was just wondering if there was a way to toggle crouch? 
Hopefully I'm not the only one who finds it annoying to stand up to type something and then duck again...

Thank you!
-Saf
 
#2
+duck in console to start crouching
-duck in console to stop crouching


And if you want a key to toggle it, paste this in your Autoexec.cfg and replace "key"'


alias crouchtoggle "crouchdown"
alias crouchdown "+duck; alias crouchtoggle crouchup"
alias crouchup "-duck; alias crouchtoggle crouchdown"
bind "key" "crouchtoggle"
#3
(03-22-2015, 11:38 AM)SnowredWolf Wrote: +duck in console to start crouching
-duck in console to stop crouching


And if you want a key to toggle it, paste this in your Autoexec.cfg and replace "key"'


alias crouchtoggle "crouchdown"
alias crouchdown "+duck; alias crouchtoggle crouchup"
alias crouchup "-duck; alias crouchtoggle crouchdown"
bind "key" "crouchtoggle"

I'll give it a try. Does it work in FL, too?
 
#4
(03-22-2015, 12:17 PM)Safira Wrote:
(03-22-2015, 11:38 AM)SnowredWolf Wrote: +duck in console to start crouching
-duck in console to stop crouching


And if you want a key to toggle it, paste this in your Autoexec.cfg and replace "key"'


alias crouchtoggle "crouchdown"
alias crouchdown "+duck; alias crouchtoggle crouchup"
alias crouchup "-duck; alias crouchtoggle crouchdown"
bind "key" "crouchtoggle"

I'll give it a try. Does it work in FL, too?

+duck is a game feature.
Using alias is also a part of the game, so yes it does Smile
#5
I tried it. Didn't work on single-player sandbox.
I needed to copy it into C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\cfg\autoexec, right?
Meh, oh well. I'll try just putting it in manually into the console to see if that works; It's mainly so that I can type without breaking FearRP.
Angel

EDIT: I had to bind the key in-game, but it works now. Thank you!
 
The following 1 user Likes Safira's post:
  • Rylund
#6
You don't need to do the "crouchtoggle" thing. Just do this:

Code:
alias duck_on "+duck;bind ctrl duck_off"
alias duck_off "-duck;bind ctrl duck_on"
bind ctrl duck_on
[Image: P6KNEfH.png]           .       
Steam | Twitter | YouTube
Signature graphic by Barkles
#7
(03-22-2015, 01:35 PM)Ms. Mudpie Wrote:
Code:
alias duck_on "+duck;bind ctrl duck_off"
alias duck_off "-duck;bind ctrl duck_on"
bind ctrl duck_on

I saw that on some forum or another, but when I tried it it wouldn't work.
Probably me and my newbity.
 
#8
You need to add the code that Jessica listed into the userconfig.cfg file that can be found by following this directory path;

[Image: 8b4abc5601.png]

Alternately, the path may be;

Common > Garrysmod > Garrysmod > config

Depending on your install path for Gmod

Within the userconfig.cfg the file (I'm using a software called Notepad++ which can be found here; [Image: f08f578e56.png]) should look something like this;

[Image: eab61cdcdb.png]

You can replace 

[Image: 8d0f7b1787.png]
and
[Image: e8d40f97f0.png]

with a key of your choice. When you then press the key your selected key your sneak will toggle on.

Enjoy!
#9
Okay, I'll try it out. I put it into autoexec last time, so perhaps that's why it didn't work.
Will update soon!
 


Forum Jump:


Users browsing this thread: 1 Guest(s)