function InParty(): boolean;
begin
  result:= Party.Chars.Count > 0;   // if the number of players in our party is > 0, then returns true 
end;

begin
  if InParty() then ...
end.