1. Hello ! I would like to know the command for Assign a group to a player in a c# plugin.

    Example : Oxide.Group.Add("PlayerName/SteamID", "RoleName");
     
  2. Wulf

    Wulf Community Admin

  3. Wulf

    Wulf Community Admin

    See the second link.
     
  4. Ohh thanks, it's hat?
    Code:
            [LibraryFunction("AddUserGroup")]
            public void AddUserGroup(string userid, string groupname)
            {
                if (!GroupExists(groupname)) return;            var data = GetUserData(userid);
                if (!data.Groups.Add(groupname.ToLower())) return;
                SaveUsers();
            }
     
  5. Wulf

    Wulf Community Admin

    You don't need all of that, that was just for reference.
     
  6. Okay, just that ?

    Example : AddUserGroup("76561198234182564", "Mod");
     
  7. Wulf

    Wulf Community Admin

    If you are using C#, permission.AddUserGroup("76561198234182564", "Mod");
     
  8. You can say me with lua for know?
    [DOUBLEPOST=1444922296,1444893768][/DOUBLEPOST]Somebody know the same function in LUA? I don't know LUA but i must mod on a plugin :/
     
  9. Wulf

    Wulf Community Admin

    Pretty much the same way.

    permission.AddUserGroup("76561198234182564", "Mod")
     
  10. SOLVED

    Thanks You Wulf !
     
    Last edited by a moderator: Oct 15, 2015
  11. Wulf

    Wulf Community Admin

    You are using UserHasPermission in one, but UserHasGroup in another. Both should work fine though. The permission does need to exist though as well as the group, so you may want to do a check if it exists before trying to send the message.
     
  12. It work thanks ! I don't understand but all is okay now. I did the same thing yesterday: /