Whats the easest way to see all users in a group? i know you can use oxide.show but i need someway to grab this list for a command.
Getting list of user groups?
You can look to see how the oxide.show command does at https://github.com/OxideMod/Oxide.Rust or how the permission system works at https://github.com/OxideMod/Oxide.Core
so the string output format im geting is steamid (playername) how do i remove everything from the string and just get the 10 diget player id in the begining?
You'd have to regex it out for now, but we will be providing a cleaner format when we overhaul that library for uMod.
any examples on regex?
Merged post
So like var uid = Regex.Replace(value, "[^0-9.]", "");
Merged post
So like var uid = Regex.Replace(value, "[^0-9.]", "");
Are you trying to create a command to get all players within a group?
try this
var playersList = new List<string>();
var idList = new List<ulong>();
foreach (var user in permission.GetUsersInGroup("vip")){
string userName = user.Split('(', ')')[1];
string userId = user.Substring(0, 17);
playersList.Add(userName);
idList.Add(Convert.ToUInt64(userId));
}