<!--
{
  "documentType" : "article",
  "framework" : "AppStoreConnectAPI",
  "identifier" : "/documentation/AppStoreConnectAPI/keeping-invited-players-on-the-same-team",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Keeping invited players on the same team"
}
-->

# Keeping invited players on the same team

Return a Boolean value that indicates whether players in the same match requests are on the same team.

## Discussion

### Declaration

```other
boolean hasInvitedPlayersOnSameTeam(array[object] $teams, array[object] $players)
```

### Parameters

-`teams`: The teams in the rule set. Pass the `teams` array that’s available in team rule expressions.
-`players`: The players that the rule applies to. Pass the `players` array that’s available in team rule expressions.

### Return value

`true` if the players in the same match requests are on the same team; otherwise, `false`. The players in a match request include the local player and any recipients or other players that the local player invites.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)