In case judgment is rendered in favor of the plaintiff in any action brought under the provisions of section 42-02-02, the court or judge rendering it also shall render judgment for reasonable attorney's fees in favor of the plaintiff and against the defendants therein. Such attorney's fees shall be taxed and collected as other costs in the action, and when collected shall be paid to the attorney for the plaintiff therein. If such attorney is the attorney general or state's attorney, such attorney's fees shall be paid into the county treasury and credited to the general fund of the county.
N.D.C.C. § 42-02-09