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/network_session_host.hpp

25 lines
586 B
C++
Raw Normal View History

2022-10-26 14:12:29 +02:00
#pragma once
#include "native_hooks.hpp"
#include "natives.hpp"
#include "pointers.hpp"
namespace big
{
namespace network
{
inline void NETWORK_SESSION_HOST(rage::scrNativeCallContext* src)
{
if (g.session.join_queued)
2022-10-26 14:12:29 +02:00
{
2023-04-14 18:54:07 +02:00
g_pointers->m_gta.m_join_session_by_info(*g_pointers->m_gta.m_network, &g.session.info, 1, 1 | 2, nullptr, 0);
g.session.join_queued = false;
2022-10-26 14:12:29 +02:00
src->set_return_value<BOOL>(TRUE);
}
else
{
src->set_return_value<BOOL>(NETWORK::NETWORK_SESSION_HOST(src->get_arg<int>(0), src->get_arg<int>(1), src->get_arg<BOOL>(2)));
}
}
}
2022-10-26 14:12:29 +02:00
}