1. Is there any way to get player group?

    Like doing usergroup add playername VIP

    How can I get that group?
    Code:
    If(player = VIP)?
     
  2. Wulf

    Wulf Community Admin

  3. And how can i Implement that on my .cs? if(GetUserGroups(player) = VIP)?
     
  4. Wulf

    Wulf Community Admin

    It returns an array, so you'd need to check that. c# if array contains - Google-Suche

    You'd need to access it properly too, permission.GetUserGroups(player.UserIDString).
     
  5. Well i'll use betterchat groups xD
     
  6. Wulf

    Wulf Community Admin

    BetterChat uses Oxide's permission system, so that's just another layer.
     
  7. But betterchat:

    BetterChat.call("PlayerInGroup", player, group);
    should retrurn true or false if group = VIP

    BetterChat.call("PlayerInGroup", player, VIP);
     
  8. Wulf

    Wulf Community Admin

    Sure, but unnecessary dependency unless you plan on actually using the full plugin. It gets the group the same was I mentioned above, so I'd use it directly unless you plan on using BetterChat too. Having BetterChat loaded just for the sake of one call is a waste of resources.
     
  9. Im gonna use the group permissions and Chat tag :S
     
  10. Wulf

    Wulf Community Admin

    Then that would make sense. ;)
     
  11. There is any form to make like... a database with all players and assign each one one of the four attributes i made?
     
  12. Wulf

    Wulf Community Admin

    What attributes are you thinking about? Oxide keeps a basic .data file with Steam ID, name, etc. and there are other plugins that store more info as well.
     
  13. like:

    Code:
    TheMechanical97:
    {
    Job: Miner
    Attribute: Strenght
    }
     
  14. Wulf

    Wulf Community Admin

    I'd store it in a datafile. There are some basic tutorials on the Docs for that.
     
  15. Why im getting an error? Why it needs to be a bool? I wnt it to be a string :S
    Code:
    BetterChat.Call("PlayerInGroup", player, group);
                    string group;
                    if (group = "player")
                   {                }
    error CS0029: Cannot implicitly convert type `string' to `bool'
     
  16. Wulf

    Wulf Community Admin

    That call is to check if they are in a group, not what the group is.
    Code:
    if (BetterChat?.Call("PlayerInGroup", player, group);)
    {
        Puts("They are in the group!");
    }
     
  17. ahhhhhh :(
    [DOUBLEPOST=1452381282][/DOUBLEPOST]maybe:

    Code:
    BetterChat.Call("GetPlayersGroups", player)
    string group;
    if (group = "player")
    etc
    [DOUBLEPOST=1452381297][/DOUBLEPOST]?
     
  18. Wulf

    Wulf Community Admin

    No, because that returns the same array that Oxide returns, so you can't just check if it equals a single string.
     
  19. And how can I check if that array is = to the group i want?
     
  20. Wulf

    Wulf Community Admin