NameRewards

Moved

Total Downloads: 162 - First Release: Nov 1, 2016 - Last Update: Nov 1, 2016

5/5, 6 likes
  1. Kappasaurus submitted a new resource:

    NameRewards - Assign players groups based on phrases found in their name.

    Read more about this resource...
     
  2. nice plugin, well for spread the server a little

    can you hook the rewards to economics and ServerRewards? will be great Some $$ as reward or Some Kit too.
     
  3. You can add kits with perms, problem is with economics people could add/take the phrase out of their name and exploit your request.
     
  4. 1 check timed?
    for example 1 check each month :D
     
  5. Hmm maybe, would get messy storing the timers for each player, maybe a chat command :/
     
  6. anyway a timer will be good

    think if somebody put the X phrase at nickname
    enter
    then delete the X phrase...

    Is not the idea, Maybe you can activate a timer, If somebody have more time the name then Better rewards
     
  7. nice idea, Kappa.
    does it Case Sensitive? would be great have that option in the config, so only exact phase will bring you to a specific group.
    also does it check player's nickname on every join?
    and i see no point to adding timer as StreetDog proposed, it's just joining server case.
    br.
     
  8. Yes it is case sensitive, however you're free to add the same phrase upper case and lower case. It does check the player's name on each join, since you need to relog for your name to update properly.
     
  9. still don't understand.. is "RaidersParadise.EU" are same as "raidersparadise.eu" ? because for me is much more easier to read and remember first one, but if players will use last one i didn't get that effect what i wanted. so they will spread my server name way no one will remember.
    sorry for my English.
     
  10. They're not considered the same by the plugin, however you can add as many phrases as you want. Feel free to add RaidersParadise.EU along with raidersparadise.eu :)
     
  11. The group comes, but does not go out after the change of name. HELP :(
     
  12. You sure? I just tested it.
     
  13. "Natrix" my nickname.
    The config put "POWERHURT"
    I create the nickname "Natrix | POWERHURT".
    I went to the server.
    Adds a group, and all is well.
    Released from the server and set the nickname "Natrix"
    I went to the server.
    I'm back in the group :(
     
  14. @Kappasaurus not be better to do it like that ?

    Code:
            void OnUserConnected(IPlayer player)
            {            permission.AddUserGroup(player.Id, config.Group);
               foreach (var phrase in config.Phrases)
                {
                    if (permission.UserHasGroup(player.Id, config.Group)) break;
                    if (!player.Name.ToLower().Contains(phrase.ToLower()))
                    {
                        if (permission.UserHasGroup(player.Id, config.Group))
                            permission.RemoveUserGroup(player.Id, config.Group);
                    }
                }
            }
    First remove user from group if he don't match word and has group
     
    Last edited by a moderator: Nov 29, 2016
  15. Keep in mind Owners inherit the traits of all groups. Test it on another account, or find a random player to do so.
     
  16. I do not understand, "Keep in mind, the owners will inherit the traits of all the groups." There is a group, and default group "reward" I'm on your plug-in player in the "reward". When they removed the "POWERHURT", they do not come out of this group (.
    [DOUBLEPOST=1480426817][/DOUBLEPOST]
    I think that your code works! Thank you! Oxide will update and be sure to check!
     
  17. Will update when I get home.
     
  18. Code:
       void OnUserConnected(IPlayer player)
            {            permission.AddUserGroup(player.Id, config.Group);
               foreach (var phrase in config.Phrases)
                {
                 
                    if (!player.Name.ToLower().Contains(phrase.ToLower()))
                    {
                        if (permission.UserHasGroup(player.Id, config.Group))
                            permission.RemoveUserGroup(player.Id, config.Group);
                    }
    I have corrected. Everything is working!
    P.S Thx my friend :)
     
  19. I hope you realize the only reason you still have the perms is because by default, the owner of a server inherits all permissions granted to groups below.
     
  20. Wulf

    Wulf Community Admin

    There is no inheritance setup by default in Oxide permissions.

    That is wrong and breaks the functionality of this plugin. You don't want a user to be added to the group without checking if they should be. You're also checking if a user is in a group twice, which is unnecessary duplication.