mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 07:07:32 +08:00
feat(Hook): Dismiss shop_controller error instead of silencing it
This commit is contained in:
parent
8d6152bcd5
commit
3394f8e65c
@ -1,6 +1,7 @@
|
|||||||
#include "gta/joaat.hpp"
|
#include "gta/joaat.hpp"
|
||||||
#include "hooking.hpp"
|
#include "hooking.hpp"
|
||||||
#include "natives.hpp"
|
#include "natives.hpp"
|
||||||
|
#include "script_global.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
@ -17,7 +18,14 @@ namespace big
|
|||||||
Any p9
|
Any p9
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (SCRIPT::GET_HASH_OF_THIS_SCRIPT_NAME() == RAGE_JOAAT("shop_controller")) return;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
return g_hooking->m_error_screen_hook.get_original<decltype(&hooks::set_warning_message_with_header)>()(
|
return g_hooking->m_error_screen_hook.get_original<decltype(&hooks::set_warning_message_with_header)>()(
|
||||||
entryHeader,
|
entryHeader,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user