From 5a3e110f90f4f2ef7be25ae9a19de734b44d51e2 Mon Sep 17 00:00:00 2001 From: birds1338 <49457375+birds1338@users.noreply.github.com> Date: Tue, 14 Mar 2023 16:52:54 +0100 Subject: [PATCH] feat: prevent exploit reports (#1091) --- src/native_hooks/all_scripts.hpp | 5 +++++ src/native_hooks/native_hooks.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/native_hooks/all_scripts.hpp b/src/native_hooks/all_scripts.hpp index 91c32f4f..422bbad6 100644 --- a/src/native_hooks/all_scripts.hpp +++ b/src/native_hooks/all_scripts.hpp @@ -144,5 +144,10 @@ namespace big { src->set_return_value(TRUE); } + + void RETURN_FALSE(rage::scrNativeCallContext* src) + { + src->set_return_value(FALSE); + } } } \ No newline at end of file diff --git a/src/native_hooks/native_hooks.cpp b/src/native_hooks/native_hooks.cpp index 9a721f45..0d898f37 100644 --- a/src/native_hooks/native_hooks.cpp +++ b/src/native_hooks/native_hooks.cpp @@ -112,6 +112,8 @@ namespace big add_native_detour(0xFE99B66D079CF6BC, all_scripts::DISABLE_CONTROL_ACTION); add_native_detour(0xEB354E5376BC81A7, all_scripts::HUD_FORCE_WEAPON_WHEEL); add_native_detour(0x158C16F5E4CF41F8, all_scripts::RETURN_TRUE); //bypass casino country restrictions + + add_native_detour(RAGE_JOAAT("shop_controller"), 0x34616828CD07F1A1, all_scripts::RETURN_FALSE); // prevent exploit reports add_native_detour(RAGE_JOAAT("carmod_shop"), 0x06843DA7060A026B, carmod_shop::SET_ENTITY_COORDS); add_native_detour(RAGE_JOAAT("carmod_shop"), 0x8E2530AA8ADA980E, carmod_shop::SET_ENTITY_HEADING);