Section 45. A sheriff, deputy sheriff or constable who appears in court as attorney for any party to a suit, or draws, makes or fills up a writ, declaration, plea or process for such party, or, with intent to procure himself to be employed in the collection of a demand, or in any manner to make gain or profit therefrom, advises, counsels or encourages a person, directly or indirectly, to commence a suit or process shall forfeit fifty dollars.