diff --git a/feature.cpp b/feature.cpp index ef3f00d..27c8a2e 100644 --- a/feature.cpp +++ b/feature.cpp @@ -657,6 +657,23 @@ void RenderWaypointsToScreen() } } +void ForceJoinGuild( SDK::APalPlayerCharacter* targetPlayer ) +{ + if ( !targetPlayer->CharacterParameterComponent->IndividualHandle ) + return; + if ( !Config.GetPalPlayerController() ) + return; + + UPalNetworkGroupComponent* group = Config.GetPalPlayerController()->Transmitter->Group; + if ( !group ) + return; + + SDK::FGuid myPlayerId = Config.GetPalPlayerController()->GetPlayerUId(); + SDK::FGuid playerId = targetPlayer->CharacterParameterComponent->IndividualHandle->ID.PlayerUId; + + group->RequestJoinGuildForPlayer_ToServer( myPlayerId, playerId ); +} + /// OLDER METHODS //SDK::FPalDebugOtomoPalInfo palinfo = SDK::FPalDebugOtomoPalInfo(); //SDK::TArray EA = { 0U }; diff --git a/feature.h b/feature.h index f48d474..3c2b7bb 100644 --- a/feature.h +++ b/feature.h @@ -65,4 +65,6 @@ void TeleportAllPalsToCrosshair(float mDistance); void AddWaypointLocation(std::string wpName); -void RenderWaypointsToScreen(); \ No newline at end of file +void RenderWaypointsToScreen(); + +void ForceJoinGuild( SDK::APalPlayerCharacter* targetPlayer ); \ No newline at end of file diff --git a/src/Menu.cpp b/src/Menu.cpp index ada3db6..4b3a99a 100644 --- a/src/Menu.cpp +++ b/src/Menu.cpp @@ -604,6 +604,11 @@ namespace DX11_Base }*/ if (Character->IsA(SDK::APalPlayerCharacter::StaticClass())) { + ImGui::SameLine(); + if ( ImGui::Button( "Join Guild" ) ) + { + ForceJoinGuild( (SDK::APalPlayerCharacter*)Character ); + } ImGui::SameLine(); if (ImGui::Button("MaskIt")) {