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/BigBaseV2/src/hooks/get_network_event_data.cpp
Reece Watson b525638fa2
feat(Protections): Added desync protection and notification (Closes #156) (#220)
* feat(Protections): Added desync protection and notification (#156)

* fix(Protections): Fix warning and revert Premake VS version
2022-05-20 18:17:41 -04:00

19 lines
486 B
C++

#include "hooking.hpp"
namespace big
{
void hooks::get_network_event_data(__int64 a1, rage::CEventNetwork* net_event)
{
__int64 event_type = net_event->get_type();
switch (event_type) {
case 161: //CEventNetworkRemovedFromSessionDueToComplaints
{
g_notification_service->push_warning("Kicked", "You have been desync kicked.");
break;
}
}
return g_hooking->m_get_network_event_data_hook.get_original<decltype(&get_network_event_data)>()(a1, net_event);
}
}