First of all, you missed the fact that they need to change the key on 3 lines, not just the first one.
Second, this crouch script is a little too simplistic to work well. the problem is once crouch is locked nothing but that button will get you uncrouched, which can be a problem in an emergency when you need to start moving fast. Here is my script for it. It sets it up so that you have a crouch lock key, a normal crouch key, which will also cancel the crouch lock if you press and release it, and prone and sprint keys that also cancel the crouch lock.
this sets the keys as capslock, ctrl, z, and shift.
if you want to change crouchlock from capslock make sure you change all the lines flagged with -- cl here
// set your crouchlock key here
Bind "capslock" "+dOn";
// -- cl here
alias "-dOn" "bind capslock +dOFF";
// -- cl here
alias "-dOFF" "bind capslock +dOn";
alias "+dOn" "+duck";
alias "+dOFF" "-duck";
// set your normal crouch key here
bind "ctrl" "+duck2"
alias "+duck2" "+duck"
// -- cl here
alias "-duck2" "-duck;bind capslock +dOn"
// set your prone key here
bind "z" "+prone"
// -- cl here
alias "+prone" "+alt1;-duck;bind capslock +dOn"
alias "-prone" "-alt1"
// set your sprint key here
bind "SHIFT" "+sprint"
// --cl here
alias "+sprint" "+speed;-duck;bind capslock +dOn"
alias "-sprint" "-speed"
this should all go in your autoexec.cfg to ensure it's not screwed up by steam.