mnscript
string[] Org.GetMembers()
Description ​
Gets an array of SteamID's in the org
Returns ​
string[]
- An array of SteamID's in the org
Example ​
msc
using System;
using Org;
using Array;
using Console;
using Player;
using Util;
// Prints the org members (name or steamid) of the player using the terminal.
Player user = System.GetUser();
Org org = Org.GetOrg(user);
if(org.IsValid()){
// If the org is valid, it means it exists.
Console.WriteLine("Org name: "..org.GetName());
Console.WriteLine("Member count: "..Util.ToString(numMembers));
string[] members = org.GetMembers();
number numMembers = Array.Length(members);
number memberIndex = 1;
while(memberIndex <= numMembers){
// For each member, get their SteamID from the array, and look for an online player.
string steamid = members[memberIndex];
Player ply = Player.GetBySteamID(steamid);
string name = steamid;
if(ply.IsValid()){
// If the player is valid, then they are online, so we can get their name.
name = ply.GetName();
}
Console.WriteLine("Member: "..name);
// Add 1 to the member index to move on to the next member.
memberIndex = memberIndex + 1;
}
}