Rockstar Games (the publisher of Max Payne 3) uses activation servers and online verification. Offline key generators simply do not work with modern DRM like Rockstar Social Club. Even if a tool claims to work, it either injects malicious code or is a hoax.
: Running an executable from an unknown source to "crack" a game can lead to your personal data being compromised or your system being locked by hackers. Common Max Payne 3 Activation Fixes
If the game asks for a code you don't have or says it's "already in use":