A universal ScriptHook implementation supporting multiple Rockstar games with automatic 32-bit/64-bit architecture selection.
- Grand Theft Auto V (64-bit)
- Red Dead Redemption 2 (64-bit)
- Red Dead Redemption (64-bit)
- Max Payne 3 (32-bit)
This ScriptHook acts as a bridge between your custom scripts and the game's native functions. It dynamically loads function pointers from the main ScriptHook DLL and forwards calls with the correct architecture (32-bit or 64-bit).
The build system automatically selects the correct architecture and target game based on your CMake preset:
- x64 presets (x64-debug, x64-release, x64-release-debug): Automatically compiles in 64-bit mode for GTA V
- x32 presets (x32-debug, x32-release, x32-release-debug): Automatically compiles in 32-bit mode for Max Payne 3
For 64-bit builds, you can change between GTA V, RDR2, and RDR by modifying common.hpp:
#if defined(FORCE_X32)
#define BIT_MODE X32
#define VERSION MP3
#elif defined(FORCE_X64)
#define BIT_MODE X64
#define VERSION GTAV // Change to: GTAV, RDR2, or RDR64-bit builds (GTA V / RDR2 / RDR):
x64-debug- Debug buildx64-release-debug- Release with debug infox64-release- Full release build
32-bit builds (Max Payne 3):
x32-debug- Debug buildx32-release-debug- Release with debug infox32-release- Full release build
- Detect the architecture from the selected preset
- Set the appropriate game target (x32 → MP3, x64 → configurable)
- Display build information during compilation
This project is provided as-is for educational and modding purposes. 2026 Vey Inc