Get teammates of player?Solved

Hey Guys,
Can anyone help me? I search the Teammate of the Player who called the plugin.

I have this Code but no Output.

RelationshipManager.PlayerTeam team = relationship.FindPlayersTeam(player.userID);
			if (team != null )
			{
				foreach (ulong membername in team.members)
				{

					SendMessage(player, Convert.ToString(membername));
				}
			} else {
				SendMessage(player, "Player has no Team");
			}

Thx for your Help

if (player.currentTeam == 0UL) return;
RelationshipManager.PlayerTeam team = RelationshipManager.Instance.teams[player.currentTeam];

And how i get the single Membernames?

I don't have an output.
Sry i've never coded with C before.

void HelloCommand(BasePlayer player, RelationshipManager relationship)
		{
			
			if (player.currentTeam == 0UL) return;
			RelationshipManager.PlayerTeam team = RelationshipManager.Instance.teams[player.currentTeam];
			foreach (ulong membername in team.members)
			{

				SendMessage(player, Convert.ToString(membername));
			}
                }
void SendMessage(BasePlayer player, string msg, params object[] args)
		{
			PrintToChat(player, msg, args);
		}

Is it right? team ist now a Dictionary. Whats a Dictionary? It's like an Array?

Thx

Locked automatically