This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/native_hooks/shop_controller.hpp
gir489 95b9724fff
Added more spam messages to the filter. (#2488)
* Added more spam messages to the filter.

* Removed duplicate remote control vehicle button from the player vehicle menu.

* Added heuristical spam detector.

* Fixed clock in spam logger.

* Added date output to the chat logger.

* Added a message to show the user when someone is spamming.
More static text translations.

* Removed redundant mobile global in scr_globals.hpp.

* Added a spam reason to the spam logger.

* Added team/all to the chat logger.
Added a logger call for the user's chats.
2023-12-07 20:04:00 +01:00

26 lines
961 B
C++

#pragma once
#include "native_hooks.hpp"
#include "core/scr_globals.hpp"
namespace big
{
namespace shop_controller
{
inline void SET_WARNING_MESSAGE_WITH_HEADER(rage::scrNativeCallContext* src)
{
if (auto entry_line = src->get_arg<const char*>(1); !strcmp(entry_line, "CTALERT_F_2"))
{
if (g.notifications.transaction_rate_limit.log)
LOG(WARNING) << "Received transaction rate limit";
if (g.notifications.transaction_rate_limit.notify)
g_notification_service->push_warning("TRANSACTION_RATE_LIMIT"_T.data(), "TRANSACTION_RATE_LIMIT_MESSAGE"_T.data());
*scr_globals::transaction_overlimit.as<PBOOL>() = FALSE;
return;
}
HUD::SET_WARNING_MESSAGE_WITH_HEADER(src->get_arg<const char*>(0), src->get_arg<const char*>(1), src->get_arg<int>(2), src->get_arg<const char*>(3), src->get_arg<BOOL>(4), src->get_arg<Any>(5), src->get_arg<Any*>(6), src->get_arg<Any*>(7), src->get_arg<BOOL>(8), src->get_arg<Any>(9));
}
}
}