PDA

View Full Version : Crouch and Walk Toggle in G-Mod



Dracula
22 Feb 2010, 03:54pm
This will be most helpfull for my fellow RP players out there but its a must for me.

Go into your Garrysmod/Garrysmod/Cfg folder. Create three new text documents, and title them "autoexec.cfg", "myaliases.cfg", and "mybinds.cfg". Once they are made, here is what you need to put in them for toggling crouch:

IN autoexec.cfg
exec myaliases.cfg
exec mybindings.cfg

IN myaliases.cfg
//Crouch Toggle
alias duck_t "duck_on"
alias duck_on "alias duck_t duck_off; +duck; developer 1; echo Crouching (on); developer 0"
alias duck_off "alias duck_t duck_on; -duck; developer 1; echo Crouching (off); developer 0"

*NEW* Walk toggle
//Walk Toggle
alias walk_t "walk_on"
alias walk_on "alias walk_t walk_off; +forward; developer 1; echo Walking (on); developer 0"
alias walk_off "alias walk_t walk_on; -forward; developer 1; echo Walking (off); developer 0"

IN mybindings.cfg
bind "KEY" "duck_t"
bind "KEY" "walk_t"

Obviously in mybindings.cfg, you put whatever key you want to toggle crouch in the quotes where I have put the word KEY. Also, duck_t stands for Duck Toggle, just so we are clear.

PingPong
23 Feb 2010, 09:40am
Nice tut, will try it out later today.

connor
17 Jun 2010, 11:45pm
nice ill try and see how it goes