m_flGoalFeetYaw = RandomFloat(-720.0f, 720.0f);
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Чтобы заставить его работать, вам понадобится API Steamworks, Protobufs и текущий идентификатор лобби
Сама функция для вызова Party_Search
В вашем RetrieveGCMessage хук
@credits : uc
Код:
HSteamUser hSteamUser = reinterpret_cast<HSteamUser(__cdecl*)(void)>(GetProcAddress(GetModuleHandleA("steam_api.dll"), "SteamAPI_GetHSteamUser"))();
HSteamPipe hSteamPipe = reinterpret_cast<HSteamPipe(__cdecl*)(void)>(GetProcAddress(GetModuleHandleA("steam_api.dll"), "SteamAPI_GetHSteamPipe"))();
steam_api::client = reinterpret_cast<ISteamClient*(__cdecl*)(void)>(GetProcAddress(GetModuleHandleA("steam_api.dll"), "SteamClient"))();
steam_api::user = steam_api::client->GetISteamUser(hSteamUser, hSteamPipe, STEAMUSER_INTERFACE_VERSION);
steam_api::friends = steam_api::client->GetISteamFriends(hSteamUser, hSteamPipe, STEAMFRIENDS_INTERFACE_VERSION);
steam_api::matchmaking = steam_api::client->GetISteamMatchmaking(hSteamUser, hSteamPipe, STEAMMATCHMAKING_INTERFACE_VERSION);
steam_api::gamecoordinator = static_cast<ISteamGameCoordinator*>(steam_api::client->GetISteamGenericInterface(hSteamUser, hSteamPipe, STEAMGAMECOORDINATOR_INTERFACE_VERSION));
Код:
g_invite_all = true;
CMsgGCCStrike15_v2_Party_Search message;
message.set_game_type(8);
message.set_ver(g_EngineClient->GetEngineBuildNumber());
message.set_apr(1);
message.set_ark(160);
void* ptr = malloc(message.ByteSize() + 8);
if (!ptr)
return;
uint32_t msgtype = k_EMsgGCCStrike15_v2_Party_Search | (1 << 31);
std::memcpy(ptr, &msgtype, sizeof(uint32_t));
reinterpret_cast<uint32_t*>(ptr)[1] = 0;
message.SerializeToArray(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(ptr) + 8), message.ByteSize());
bool result = steam_api::gamecoordinator->send_msg(msgtype, ptr, message.ByteSize() + 8) == k_EGCResultOK;
free(ptr);
Код:
if (message_type == k_EMsgGCCStrike15_v2_Party_Search && g_invite_all)
{
CMsgGCCStrike15_v2_Party_SearchResults message;
message.ParsePartialFromArray(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(pubDest) + 8), *pcubMsgSize - 8);
int invite_count = 0;
for (auto entry : message.entries())
{
CSteamID player;
player.InstancedSet(entry.id(), 1, k_EUniversePublic, k_EAccountTypeIndividual);
if (steam_api::matchmaking->InviteUserToLobby(g_lobby_id, player))
++invite_count;
}
g_CVar->ConsolePrintf("Invited %i players\n", invite_count);
message.SerializeToArray(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(pubDest) + 8), message.ByteSize());
*pcubMsgSize = message.ByteSize() + 8;
g_invite_all = false;
}
Последнее редактирование: