Not creating or adding players to groups
Line 6767+6768 From:
foreach (var entry in factionData.Factions) { ConsoleSystem.Run(ConsoleSystem.Option.Server, $"usergroup remove {player.userID} {factionData.Factions[entry.Key].group}"); }
ConsoleSystem.Run(ConsoleSystem.Option.Server, $"usergroup add {player.userID} {factionData.Factions[faction].group}");
To:
foreach (var entry in factionData.Factions) { ConsoleSystem.Run(ConsoleSystem.Option.Server, $"oxide.usergroup remove {player.userID} {factionData.Factions[entry.Key].group}"); }
ConsoleSystem.Run(ConsoleSystem.Option.Server, $"oxide.usergroup add {player.userID} {factionData.Factions[faction].group}");
permission.AddUserGroup(player.UserIDString, factionData.Factions[faction].group); Merged post
Like this ?
foreach (var entry in factionData.Factions) { permission.AddUserGroup(player.UserIDToString, factionData.Factions[faction].group); }
permission.RemoveUserGroup(player.UserIDToString, factionData.Factions[faction].group);
bobbersonThanks Wulf
Merged postLike this ?
foreach (var entry in factionData.Factions) { permission.AddUserGroup(player.UserIDToString, factionData.Factions[faction].group); }
permission.RemoveUserGroup(player.UserIDToString, factionData.Factions[faction].group);
Looks fine.
Merged post
error CS1061: Type `BasePlayer' does not contain a definition for `UserIDToString' and no extension method `UserIDToString' of type `BasePlayer' could be found
bobbersonthank you very much
Merged posterror CS1061: Type `BasePlayer' does not contain a definition for `UserIDToString' and no extension method `UserIDToString' of type `BasePlayer' could be found
Err, sorry... UserIDString
I updated the original example: https://umod.org/community/factions/12012-not-creating-or-adding-players-to-groups?page=1#post-4bobbersonYou will have to excuse me Im clueless. What do I do?
Merged post
it is no longer adding and removing players properly
Those are the methods the commands use, but there won't be any feedback if the plugin doesn't account for something such as the group existing, player already in a group, etc.bobbersonthanks again
Merged post
it is no longer adding and removing players properly