There was another cop in their car, so,you were actually "messing" with both cops at that time even if your intention was to " mess" with your friend only.
If you see your cop friend along with a bunch of cops in a vehicle, you should not disrupt their gameplay with a reason "i just want to have fun with my friend and the other cops present in that car must wait until i finish having fun".
Denied.