Can anyone point me to a tutorial on how to make a melee SWEP?

I know how to make regular SWEPS, but i can’t get my hands on a tutorial on how to make them melee. I’ve got the model and texture and everything working, just need to code it, anyone?