Jump to content
Sign in to follow this  
Tonic

Toggle Crouching

Recommended Posts

Originally posted by kingryan on 2/21/2017

 

Note: This is not mine. This is from a friend of mine, Siphon76.
We all have that hatred. "I keep getting killed while I'm typing, even though i'm in cover."

Well no more, lads.

All you need to do is go to your Gmod config folder, under Program x86 > Steam > steamapps > GarrysMod > garrysmod > cfg (or C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\cfg for those who have an alike-setup directory) and open up the "Autoexec.cfg" in Notepad. If Autoexec.cfg does not exist, create it as a text document. Make sure the file saves as a .cfg (renaming won't always work, you'll need to change the file-type entirely) and open it.

Once it is open, copy and paste the following code into the file:

alias duck_on "+duck; alias toggleduck duck_off"
alias duck_off "-duck; alias toggleduck duck_on"
duck_off
bind ctrl toggleduck

That's it. Save it, restart Gmod if you have it open.

ctrl at the bottom can be substituted for whatever control you'd like. I, personally, use "alt" (left alt key) as my toggle crouch, but you can assign it to whatever you'd like.

I've been using this for the better part of 5 months - and let me tell you, it's saved myself from a PK numerous times. Feel free to comment below if you have questions regarding which key is which (Like the number pad keys... Numkeys are annoying as fuck).

Enjoy!
 

Share this post


Link to post

that's great and all but vvhat about vvalking

alias toggle_forward_on "+forward; bind w toggle_forward_off"

alias toggle_forward_off "-forward; bind w toggle_forward_on"

bind w toggle_forward_on

Share this post


Link to post
10 hours ago, AlphaDuck said:

Can't you just type +duck in the console and then -duck when you're done?

why do that when you can toggle duck with the press of a button?

4 hours ago, Deadeye said:

I just bind +duck to n and -duck to m lol

i think you're lying because setting a key to crouch just binds it to +duck, it doesn't make a toggle

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×