Is In My Team

public bool IsInMyTeam(Unit other)
public bool IsInMyTeam(byte otherPlayerId)

Returns true if the other unit or player is on the same team as the unit this method was called from.