mckay described the genesis as an "accident, in a way", stemming from a dinner he and ferrell had with wahlberg. after noticing the actors' chemistry, mckay wrote producer kevin messick an email hypothesizing a possible film starring the two, giving a cop film as an example of what he thought would work. messik suggested developing that idea into a film.