Some films put it in the opening titles. As for videogames — GTA V, for example, has "The content of this videogame is purely fictional, is not intended to represent or depict any actual event, person, or entity, and any such similarities are purely coincidental. The makers and publishers of this videogame do not in any way endorse, condone, or encourage engaging in any conduct depicted in this videogame" disclaimer on its second loading screen, right after the initial splash screen with Rockstar's logo.
Notice especially the second sentence about game makers not endorsing whatever behaviour is depicted in the game. The first sentence, by the way, is patently false because GTA Online features a character "Dr. Dre", voiced by Dr. Dre — no way it was "purely coincidental".