Loyalty

Moved

Total Downloads: 1,205 - First Release: Jun 24, 2016 - Last Update: Mar 30, 2018

5/5, 8 likes
  1. Hey all may I give you all my temporary fix until OP/Wulf is able to maintain this? Please see attached. like I said it is a temporary fix.
     
  2. Can you specify what kind of fix you´ve done?
     
  3. basically I have taken it from using the
    permission.AddUserGroup(player.UserIDString, usergroup.usergroup);

    to using

    rust.RunServerCommand("oxide.usergroup add " + player.UserIDString + " " + usergroup.usergroup);

    This sets the group/permission like you would in console.
     
  4. Wulf

    Wulf Community Admin

    The "oxide.usergroup" command uses permission.AddUserGroup; the change you made doesn't change or fix anything.

    Click here to see that the command uses this exact, same method. Running the command = using the permission.AddUserGroup method.

    My guess is that people are using groups that do not exist, so you may not see a warning for that with the method. A group should exist beforehand, if not it will not add the user to the group. This is something that should be remedied in the plugin if it doesn't already create the group.
     
  5. Hi Wulf,

    Firstly thank you for your response, we know you are extremely busy.

    I can't speak for anyone else but I had all my groups already set up, with all permissions. The plugin also will not allow you to create a loyalty group if there is no oxide group already set up and stated this error in red.

    The "oxide.usergroup" may very well use the same call but before I changed it the plugin was definitely not setting players into the group they should be moved to.

    My apologies for posting a random version of the plugin.
     
  6. Just to be sure I had everything spelled correctly I redid the plugin or to weed out other issues, but it still don´t give the usergroup as reward as it should, it list the player in the LoyaltyData as in the usergroup, but they´re actually not given the usergroup, so I have to manually add them to the usergroup, I uses Name tag and Kits that only work when in a specific usergroup so quite easy to find out if they´re in an usergroup or not.
     
  7. Wulf

    Wulf Community Admin

    Did you create the group that you configured them to be assigned to already?
     
  8. Yes, example I have a VIP group (listed in oxide.groups.data) which I can manually add players to with the oxide.usergroup add xxx VIP which also have permission to use an usergroup specific Kit along with a Better Chat tag.
    In loyalty I used the /loyalty 1440 addg VIP so players get VIP after been playing for 1440 minutes or 24 hours.
    When they reach the 1440 they get told they get added to the VIP group by the Loyalty plugin, as well as I can see them added in the LoyaltyData file, however they´re are not added to the VIP usergroup, getting name tag or kit permission.
     
  9. Wulf

    Wulf Community Admin

    Could you try with just "vip", not "VIP" and see if makes a difference when using the command?
     
  10. Yeah I tried that as I noticed the oxide.groups.data file had all listed in minor letters (even though it adds correctly when using capital letters with the manually adding... perhaps it don't make a different between minor and capital?). I tested out with listing loyalty with giving vip (not VIP) and I saw it listed as vip in loyaltyData (compared to VIP before) but yet it didn't grant the usergroup to the player.
     
  11. OK let me try this again.

    Although as Wulf has stated that it does the same thing, this modification to the code does definitely work.

    Moderator edit: code removed, use Version History if desired

    This is to replace the code in the Void loaded section.

    This modification is only for people that feel comfortable to change the plugin .cs file.
     
  12. Wulf

    Wulf Community Admin

    You can use a previous version of the plugin (Version History tab) if the latest doesn't work for you. No need for manual modifications.
     
  13. Hi, Could it be possible to add commands as reward in order to use it with Timed Permissions or "loyalty.reset" for exemple or any others possibility?

    And an option to decrease point every X time.
     
    Last edited by a moderator: Mar 28, 2018
  14. Wulf

    Wulf Community Admin

    Possible. I'll think about that during the re-write I'm working on.
     
  15. After yet again reinstalling and testing out giving usergroup as reward, which failed again despite the plugin listing the player in the given usergroup, I decided to give the suggestion from Zodiak1109 in post #143 a try and replaced the code and the first player I had to reach the required loyalty points was given the usergroup as reward, which I confirmed with the user as having access to the other stuff I have granted the usergroup.
     
  16. Wulf

    Wulf Community Admin

    Wasn't saying it wouldn't, but that's not the proper method to use. There's no reason why the current version would not work as it uses the same, exact method that the command would call. I'm not seeing any reason why this wouldn't work. The changes are the same as what was in a previous version of the plugin, but it was updated as calling the command is not the way it should be done.

    Edit: Aha! The plugin appears to be storing the player data wrong, so it was trying to send the name instead of the player ID.
     
    Last edited: Mar 30, 2018
  17. Wulf

    Wulf Community Admin

    Wulf updated Loyalty with a new update entry:

    1.3.5

     
  18. Very simple to fix I imagine, but i get this..

    Error while compiling: Loyalty.cs(444,115): error CS1525: Unexpected symbol `)', expecting `;' or `}'
     
  19. Wulf

    Wulf Community Admin

    Yup, what I get for trying to do a hotfix while away from the desktop. :p
     
  20. Wulf

    Wulf Community Admin

    Wulf updated Loyalty with a new update entry:

    1.3.6