TimedPermissions

Moved

Total Downloads: 2,967 - First Release: May 20, 2016 - Last Update: Apr 7, 2017

5/5, 22 likes
  1. Thats not really the idea of the plugin, you could have a simple seperate plugin which does that.
     
  2. You can create a command that when typing a command, the plugin gives the player /addgroup name vip 1h
     
  3. @LaserHydra a little typo:
    U3JxqJh2TBe-7qpxMbBJ2w.png
    should be <group>

    thx for great plugin =]
     
  4. Is there a way that players can check their remaining term themselves (/pinfo) without timedpermission.use rights?
     
  5. At the moment, there isn't. However if you're daring, you can add this snippet of code after the /pinfo command. It's basically a clone of the /pinfo command edited to return info for the player who uses the command. On my server, it's called using /myinfo.
    Place after the closing brace of private void CmdPlayerInfo, just before the #endregion, around line 400.
    Code:
         [Command("myinfo")]
            private void CmdMyInfo(IPlayer player, string cmd, string[] args)
            {
              
                ulong steamID = 0;
              
                if (player != null)
                {
                    Player pl = Player.Get(player.Id);
                    if (steamID == 0 && player == null)
                        return;                if (pl == null)
                          player.Reply(GetMessage("Player Has No Info", player.Id));
                    else
                    {
                      string msg = GetMessage("Player Info", player.Id);
                        msg = msg.Replace("{player}", $"{pl.Name} ({pl.Id})");
                    msg = msg.Replace("{groups}", string.Join(", ", (from g in pl.Groups select $"{g.Value} until {g.ExpireDate.ToLongDateString() + " " + g.ExpireDate.ToShortTimeString()}").ToArray()));
                    msg = msg.Replace("{permissions}", string.Join(", ", (from p in pl.Permissions select $"{p.Value} until {p.ExpireDate.ToLongDateString() + " " + p.ExpireDate.ToShortTimeString()}").ToArray()));
                        player.Reply(msg);
                    }
                }
            }
    Disclaimer: This was intended as a quick fix (from a year ago?) that I haven't looked at since. There's probably a better way to do it. Just to be clear: this is not my work as such. I just tweaked what the author wrote. If it works, he/she deserves the credit. If it doesn't I deserve the blame for breaking it.
     
  6. Great thank you. It works
     
  7. my data time out permission alive

    what is happen?
     
  8. Please translate this again. This does not make sense as it is. Maybe you can post the question in your native language under the English translation.
     
  9. Permission is added and deleted from data after group time,

    There is no deletion or addition in oxide.users.data.
     
  10. Not work in my server...
     
  11. how can i delete all permissions
     
  12. Delete oxide/data/TimedPermissions and reload the plugin.
     
  13. hey man. i have been using and loving this plugin for ages, but i wouldnt update past *1.2.7 because it seemed troublesome.
    well now i have, the data migration didnt work , it just crashed the compilation, so i manually removed users data and timedpermissionsdata, and wrote out a list of "addgroup" commands , to restore the data manually.
    only problem is, i'm getting a lot of this:
    12:03 [Info] Could not find player with ID '765611982191XXXXX'
    - and it isn't adding those players to the data file.

    I'm currently looking at the code trying to figure out why and how it's trying to "find" a player who i've already identified explicity, and stop it doing that, but i was wondering if you could maybe help me save some time - i dont really know CSharp! also , seems like something of a bug i suppose?
    i did wonder if perhaps its waiting for them to be online in the server, to add them , or something ?

    although some of the people it DID add, were not online.. i thought the problem is it needs a connected player to identify but seems not, so now i am very confused.

    can i.. pay you to make a version that just takes the given SteamID and adds the group for the time, none of this IPlayer stuff ? :D

    thanks !
     
    Last edited by a moderator: Jan 24, 2018
  14. Wulf

    Wulf Community Admin

    What is wrong with the IPlayer stuff? It's not any different than using another type.
     
  15. I can't use the addgroup command on users who are not online? Or whatever it is that makes it say "Could not find player with ID '765611982191XXXXX'" ---- i don't need it to find that player. they are found

    i've revert to using old version 1.2.7 because it just takes the ID i provide and applies the timed group.
    i've now coded myself the functionality of stacking durations (new after 1.2.7 in this plugin) on existing timed group rules. do you happen to know if this plugin re-applies groups that were removed via usergroup command at any time (server start?)? if so, i still could use the removegroup command functionality that 1.2.7 doesnt have.
     
  16. Wulf

    Wulf Community Admin

    That isn't really related to IPlayer, but using an IPlayer would be the only way to get the ID for a player that isn't online as Rust doesn't store that.
     
  17. I'm using this on Hurtworld (v1, mostly), but the point is that I already have the exact IDs for all of the players in my equation, and most are offline, and almost all "cant be find by IPlayer" lol, you see?
     
  18. Wulf

    Wulf Community Admin

    Not really an IPlayer issue, just how the plugin is checking. Checking offline players would mean a lot more resource usage, as you're checking EVERY player that has every connected and been stored.
     
  19. But I dont need to check them. Old version doesnt check them and it works better because of that