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
2023-04-14 17:54:07 +01:00

25 lines
586 B
C++

#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)
{
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;
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)));
}
}
}
}