An NYPD cop was arrested Wednesday for engaging in a sexual relationship with a woman he arrested - and for sending inappropriate messages to crime victims, police sources said Wednesday. Officer Matthew Lambert pleaded guilty to three counts of official misconduct in Manhattan Criminal Court on Wednesday, hours after being arrested. He also pleaded guilty to accepting an illegal gratuity. He was sentenced to two years probation and 100 hours of community service. Lambert joined the NYPD in 2014 and resigned in December, sources said. He is accused of having a sexual relationship with a woman he arrested and sending lewd messages to both arrestees and crime victims he met through work. Before his departure, he was reassigned to Patrol Service Area 2's Viper Room - where cops accused of misconduct are often assigned - to watch feeds from NYCHA surveillance cameras in north Brooklyn, according to his online personnel page. Lambert made 96 felony arrests and 101 misdemeanor arrests during his 11-year NYPD career. He had six complaints filed with the Civilian Complaint Review Board with 18 allegations that included force, abuse of authority, and discourtesy, but only three were substantiated. He was named in seven lawsuits that led to $150,000 in payout settlements, according to the website 50-a.org #nydailynews #crimewatchnewyork