Timed Permissions

Allows you to grant permissions or groups for a specific time

Total Downloads: 1,519 - First Release: May 20, 2016 - Last Update: Apr 7, 2017

5/5, 18 likes
  1. StreetDog

    StreetDog Shack Builder


    I need to do this for remove a Timed permission ?
     
  2. Ventrex

    Ventrex Wood Hoarder

    Yes, I would suggest open the file TimedPermissions.json) with notepad++ so you can see which lines are together and remove them all at the same time. If it is the last lines of the file don't forget to remove the , after the }
    When the server is on reload the plugin with /reload TimedPermissions
     
  3. sanchesster

    sanchesster Scavenger

    Dear Lazer, is it possible to add grantperm group command?
    I need to grant permission to default group.
    Is there another way to give timed permission to default group
     
  4. sami37

    sami37 Master Researcher Plugin Developer

    The must have for this plugin is a command to reduce time and one to delete

    Ps: pinfo don't work on consolecommand
     
  5. sanchesster

    sanchesster Scavenger

    Try to use ID too
    pinfo.png
     
  6. sami37

    sami37 Master Researcher Plugin Developer

    doesn't matter the registered message is Player Info and the call is Player info

    @LaserHydra you will need to change it to your next update line 413
     
  7. Findles

    Findles Shack Builder

    I use this plugin to grant players VIP for certain duration. The problem is that players can't tell how long their permissions last. Can you please make it so that players can use /pinfo provided they have permission? (like timedpermission.pinfo)
     
  8. Mr.Wolf 2

    Mr.Wolf 2 Naked Wanderer

    hello. Timed permission
     
  9. sami37

    sami37 Master Researcher Plugin Developer

    like that ?

    Code (Text):
            [Command("myinfo")]
            void cmdMyInfo(IPlayer player, string cmd, string[] args)
            {
                var target = player;
                if (target != null)
                {
                    if (Player.GetOrCreate(target) == null)
                        _players.Add(new Player(target));

                    Player pl = Player.Get(target);

                    if (pl == null)
                        player.Reply(GetMsg("Player Has No Info"));
                    else
                    {                  
                        string msg = GetMsg("Player Info");
                       
                        msg = msg.Replace("{player}", $"{pl.name} ({pl.steamID})");
                        msg = msg.Replace("{groups}", string.Join(", ", (from g in pl.groups select $"{g.@group} until {g.expireDate}").ToArray()));
                        msg = msg.Replace("{permissions}", string.Join(", ", (from p in pl.permissions select $"{p.permission} until {p.expireDate}").ToArray()));

                        player.Reply(msg);
                    }
                }
            }
     
     
    Windamyre likes this.
  10. Findles

    Findles Shack Builder

    that seems to work. thanks. wish it were in the official release. cheers
     
    Windamyre likes this.
  11. Spyrek

    Spyrek Naked Wanderer

    Anyone know why plugin adds users to wrong group?
    Code (Text):
    [Info] [DonationClaim] Covalence.HurtworldPlayer[7656xxxx,   xxxxx] has claimed donation package svip
    [Info] [Timed Permissions] ----> unknown (7656xxxxx) - Added to Group: vip for 29.23:59:59.9266390
    Code (Text):
    "Packages": {
        "vip": [
          "addgroup {0} vip 30d"
        ],
        "svip": [
          "addgroup {0} svip 30d"
        ],
      }
    Edit:
    Fixed. Changing order of packages fixes the problem :O
     
    Last edited: Mar 24, 2017
  12. sami37

    sami37 Master Researcher Plugin Developer

    Nothing seem wrong in both plugin, maybe try to reload both plugin and try again
     
  13. Spyrek

    Spyrek Naked Wanderer

    Didn't help.

    Edit:
    Fixed. Changing order of packages fixes the problem :O
     
  14. sami37

    sami37 Master Researcher Plugin Developer

    It's a tweak not a fix, plugin dev should correct it
     
  15. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    LaserHydra updated Timed Permissions with a new update entry:

    1.3.0

    Read the rest of this update entry...
     
  16. UkFsG

    UkFsG Wood Hoarder

  17. Casper ;3

    Casper ;3 Shack Builder

    If the player adds a privilege for 30 days, and the privilege has already been added earlier, then the time will be stacked (60 days minus past time)?
     
  18. diman96ru

    diman96ru Wood Hoarder

    No, just a plus goes (30+30=60). Help, addgroup yes, perm no:(
     
    Last edited: Mar 26, 2017
  19. Casper ;3

    Casper ;3 Shack Builder

    What? If player have 1 day to expire date and adds himself permission/group for 30 days, then just have 60 days? :D
     
  20. diman96ru

    diman96ru Wood Hoarder

    1+30=31
    --- Double Post Merged, Mar 26, 2017 ---
    Fix addgroup please.