Skip to main content

Kick a Player From a Party

Last updated on

The party leader has the privilege to remove a party member from their party by kicking them out of the party. The kicked party member will receive a notification that they've been kicked out of the party, and current party members will also receive a notification that someone has been kicked from the party.

FRegistry::Lobby.Connect();
FRegistry::Lobby.SetInvitePartyKickMemberResponseDelegate(AccelByte::Api::Lobby::FPartyKickResponse::CreateLambda([](const FAccelByteModelsKickPartyMemberResponse& Result)
{
if (Result.Code == "0")
{
// Do something if InvitePartyKickMemberResponseDelegate has been successful
}
else
{
// Do something if InvitePartyKickMemberResponseDelegate has an error
}
}));

FString UserId = FString("SomeUserId");

FRegistry::Lobby.SendKickPartyMemberRequest(UserId);