2021-05-20 15:49:36 +02:00
|
|
|
#include "gta/joaat.hpp"
|
|
|
|
#include "hooking.hpp"
|
|
|
|
#include "natives.hpp"
|
2021-12-22 14:38:51 +01:00
|
|
|
#include "script_global.hpp"
|
2021-05-20 15:49:36 +02:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2021-12-22 14:26:54 +01:00
|
|
|
void hooks::set_warning_message_with_header(
|
|
|
|
const char* entryHeader,
|
|
|
|
const char* entryLine1,
|
2021-05-20 15:49:36 +02:00
|
|
|
int instructionalKey,
|
2021-12-22 14:26:54 +01:00
|
|
|
const char* entryLine2,
|
|
|
|
bool p4,
|
2021-05-20 15:49:36 +02:00
|
|
|
Any p5,
|
2021-12-22 14:26:54 +01:00
|
|
|
Any* showBackground,
|
|
|
|
Any* p7,
|
|
|
|
bool p8,
|
|
|
|
Any p9
|
2021-05-20 15:49:36 +02:00
|
|
|
)
|
|
|
|
{
|
2021-12-22 14:38:51 +01:00
|
|
|
if (SCRIPT::GET_HASH_OF_THIS_SCRIPT_NAME() == RAGE_JOAAT("shop_controller") && strcmp(entryLine1, "CTALERT_F_2") == 0)
|
|
|
|
{
|
|
|
|
// dismisses popup instead of killing it silently
|
|
|
|
*script_global(4529830).as<int*>() = 0;
|
|
|
|
|
|
|
|
// we still return to prevent our original call from rendering a single frame
|
|
|
|
return;
|
|
|
|
}
|
2021-07-24 15:00:23 +02:00
|
|
|
|
2021-12-22 14:26:54 +01:00
|
|
|
return g_hooking->m_error_screen_hook.get_original<decltype(&hooks::set_warning_message_with_header)>()(
|
2021-12-22 01:13:10 +01:00
|
|
|
entryHeader,
|
|
|
|
entryLine1,
|
|
|
|
instructionalKey,
|
|
|
|
entryLine2,
|
|
|
|
p4,
|
|
|
|
p5,
|
2021-12-22 14:26:54 +01:00
|
|
|
showBackground,
|
|
|
|
p7,
|
|
|
|
p8,
|
|
|
|
p9
|
2021-12-22 01:13:10 +01:00
|
|
|
);
|
2021-05-20 15:49:36 +02:00
|
|
|
}
|
|
|
|
}
|