Skip to content

How to check if in party?

I'm teleporting a player to the party leader, however I would like to check if they are in a party. I was hoping the following would work. Ideas on how to go about this?
if (GetFactionLeader(oPC) == OBJECT_INVALID)// also tried GetNextFactionMember(oPC)
       {
         SendMessageToPC(oPC, "You are not in a party." );
       }
else
	{
		//Zhu Li Do The Thing!
	}

Comments

  • meaglynmeaglyn Member Posts: 151
    It's almost certainly returning the given PC when that PC is her own party leader (e.g. alone). Just checking if GetFactionLeader(oPC) equals oPC should do it, I'd think.
  • ForSeriousForSerious Member Posts: 466
    You also have the situation where the party leader tries to teleport, mistakenly, to themself. I agree with meaglyn.
Sign In or Register to comment.