fix(GetEventData): Added check for if the event came from a valid client

This commit is contained in:
Yimura 2021-01-02 11:56:00 +01:00
parent 7f50ed47dd
commit 638034044b
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78

View File

@ -8,10 +8,10 @@ namespace big
bool hooks::get_event_data(int32_t eventGroup, int32_t eventIndex, int64_t* args, uint32_t argCount)
{
bool result = g_hooking->m_get_event_data.get_original<decltype(&hooks::get_event_data)>()(eventGroup, eventIndex, args, argCount);
Player player = (Player)args[1];
if (result)
if (result && player < 32)
{
Player player = (Player)args[1];
auto hash = args[0];
char type[32] = "";
@ -61,7 +61,8 @@ namespace big
break;
case RemoteEvents::RotateCam:
strcpy(type, "Rotate Cam");
//strcpy(type, "Rotate Cam");
return false;
break;
case RemoteEvents::SendToCutscene: