mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 06:47:22 +08:00

The main goal was improving the readability of the original code however some ugliness remains. - Swapped from pointer singleton to instance singleton - Actually make use of the alpha logic that used to be present - Added a counter to notifications to indicate if something is being spammed - Notification timeouts reset if they're sent to the queue again
16 lines
365 B
C++
16 lines
365 B
C++
#include "hooking/hooking.hpp"
|
|
|
|
namespace big
|
|
{
|
|
bool hooks::receive_pickup(rage::netObject* object, void* unk, CPed* ped)
|
|
{
|
|
if (g.protections.receive_pickup)
|
|
{
|
|
g_notification_service.push_error("PROTECTIONS"_T.data(), "Blocked pickup");
|
|
return false;
|
|
}
|
|
|
|
return g_hooking->get_original<hooks::receive_pickup>()(object, unk, ped);
|
|
}
|
|
}
|