Timed Permissions

Allows you to grant permissions or groups for a specific time

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

5/5, 17 likes
  1. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    Temporarely rename "Player Info" to "Player info" in the lang file.
     
    Dream 5 likes this.
  2. Dream 5

    Dream 5 Shack Builder

    Okay, thanks for your swift response :cool: Unsure if this is helpful but what I've just experienced happen is that when I removed a player from a group, I got the feedback "Mr.KaNe isn't in group 'vip'." but it still removed him from the group.
    --- Double Post Merged, Mar 29, 2017 ---
    Doesn't fix the issue, still no feedback from console either. Permissions are being granted though.
     
  3. Suslik

    Suslik Scavenger

    +1
    command pinfo not work.
     
  4. Rizzok

    Rizzok Wood Hoarder

    Would be nice to have hooks for other plugins like Add/Remove player/group perms and show active counters on player...
     
  5. Rizzok

    Rizzok Wood Hoarder

    @LaserHydra also found two bugs in plugin:
    1.
    Code (Text):
            [Command("removegroup"), Permission("timedpermissions.use")]
            private void CmdRemoveGroup(IPlayer player, string cmd, string[] args)
            {
                ...
                if (pl == null || !pl.Permissions.Any(p => p.Value == args[1].ToLower()))
     
    should be
    Code (Text):
                if (pl == null || !pl.Groups.Any(p => p.Value == args[1].ToLower()))
    2.
    Code (Text):
            [Command("pinfo"), Permission("timedpermissions.use")]
            private void CmdPlayerInfo(IPlayer player, string cmd, string[] args)
            {
               ...
                    string msg = GetMessage("Player info", player.Id);
     
    should be
    Code (Text):
                    string msg = GetMessage("Player Info", player.Id);
     
    LaserHydra likes this.
  6. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    Indeed. The second one was already known to me. Thanks for seeking the first.
     
  7. Casper ;3

    Casper ;3 Shack Builder

    removegroup "player" "group" doesn't works.
    Player isn't in group "group".
     
  8. Rizzok

    Rizzok Wood Hoarder

    For quickfix find "private void CmdRemoveGroup" in TimedPermissions.cs, sroll down to "if (pl == null || !pl.Permissions.Any(p => p.Value == args[1].ToLower()))" and change "Permissions" to "Groups"
     
  9. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    Dream 5 likes this.
  10. sami37

    sami37 Master Researcher Plugin Developer

    @LaserHydra any way that you can change addgroup command to update date when you are adding a group that already exist instead of adding additonnal data line.

    Exemple :

    addgroup 7656119xxxxxxx66 builder 20d => expire 27th/04
    addgroup 7656119xxxxxxx66 builder 22d => expire 29th/04

    Actually it just add aditionnal data like

    Code (Text):
      {
        "permissions": [],
        "groups": [
          {
            "group": "vip+",
            "_expireDate": "31/13/30/4/2017"
          },
          {
            "group": "vip+",
            "_expireDate": "56/13/7/5/2017"
          }
        ],
        "name": "unknown",
        "steamID": "7656119xxxxxxx66"
      },
     
    it's really bad as if you add the same group before the old one expire, it just removed the last entry instead of the expired one, it just happen with one of my player.

    i was forced to add the new group again
     
  11. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    You don't seem to be on the latest version.
     
  12. sami37

    sami37 Master Researcher Plugin Developer

    Didn't see I'll try the new
     
  13. Dream 5

    Dream 5 Shack Builder

    Seems to be working great thanks, Hydra :* Only minor thing is that there's no feedback such as' group granted' when adding someone to a group through the console.
     
  14. sKilloWsky

    sKilloWsky Wood Hoarder

    Is it possible to add someone to the same group the second time, so that the time is longer and not create a timer second time?
    Because as someone is added twice in one group (two different times), the one that ends up removes the group, although there is another time.

    Sorry, i'm use translator ;d
     
  15. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    Update your plugin.
     
  16. Suslik

    Suslik Scavenger

    For the future, if there is a possibility to do so:
    Need a Chat Command, the type of "pinfo", but with a different permission for players. So that players can check how much time is left before the end of their specific time permissions.
     
    sKilloWsky likes this.
  17. sKilloWsky

    sKilloWsky Wood Hoarder

    Suslik, very nice idea!
     
  18. Artasan

    Artasan Shack Builder Plugin Developer

    @LaserHydra would be nice to have <time> option to work like adding time to corresponding permission not just set or reset it. and if timer isnt created it creates it.
    as example: player used same command from reward shop twice, which gives him permission for 10 minutes, he will get 20 minutes with that perm instead of 10 minutes + time he spent using same command for second time.
    br.
     
  19. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    The command does currently add time onto existing.
     
    Artasan likes this.