How do you make an NPC from an existing model

I need to know how to make an NPC from a model that is already a ragdoll. I need to know what program to use and how to do it. What I think I know now is that you have to add animations, an H.L.2 skeleton and some other stuff. Please help me if you can. Thanks.

You would have to write the code, not use some magic program that does it for you, or jsut copy an already in use NPC and change the model.

Then what is the things I need to write in the code, because I have decompiled a model that I was trying to make an NPC out of, and pasted this into the Q.C. :

$includemodel “humans/male_shared.mdl”
$includemodel “humans/male_ss.mdl”
$includemodel “humans/male_gestures.mdl”
$includemodel “humans/male_postures.mdl”

I’m not sure if that’s what you are supposed to do or not, so yeah I do need some help. And if I can’t do that, then I need to know what a code is and how to write one.