1. Hello,

    I have few ideas how to achieve it, but I would like a second opinion for a method that would definitely do what I want, instead of me bumping into many problems half way and having to work around it.

    Cheers !
     
  2. I suppose you could use this to get which day it currently is?

    Code:
    DateTime.Today.DayOfWeek
     
  3. Im considering using Cron Library for Rust | Oxide to help me out with timed event execution as the command would have to be executed at a certain hour. However, what can be done about the actual execution of a command ? How do I call "grant group default permission.allow" ?

    [EDIT]: Nwm, found it: ConsoleSystem.Run(ConsoleSystem.Option.Server.Quiet(), "grant group default permission.allow", null);
     
    Last edited by a moderator: Oct 5, 2017
  4. Wulf

    Wulf Community Admin

    You don't need top run a command, just call the permission.GrantGroupPermission method directly.
     
  5. What would be an exact syntax for that ?

    e.g. "permission.GrantGroup(default, permission.allow) ?
     
  6. Wulf

    Wulf Community Admin

    GrantGroupPermission(string name, string perm, Plugin owner)

    permission.GrantGroupPermission("default", "permission.allow", this);
     
  7. No errors in console, but it doesn't do anything when called either.
     
  8. Wulf

    Wulf Community Admin

    That's the same method that the command uses to grant the permission, so should work fine.
     
  9. //ConsoleSystem.Run(ConsoleSystem.Option.Server.Quiet(), "grant group default permission.allow", null);
    permission.GrantGroupPermission("default", "permission.allow", this);

    Got them both on the same line when called. This does nothing, but if I swap comment outs, it works.
     
  10. Wulf

    Wulf Community Admin

    Try with null instead of this for the method.
     
  11. Just did, no reaction whatsoever.
    [DOUBLEPOST=1507168235][/DOUBLEPOST]Also, while on similar topic, is there a way to call chat commands via plugin as admin ? Cos my other option would be re-write other plugins to have console commands registered.
     
  12. Wulf

    Wulf Community Admin

    If a chat command expects a player, they will error as the server console doesn't really have a player; so it depends on the command.
     
  13. No, commands would be of similar nature as "/kits resetdata"
     
    Last edited by a moderator: Oct 5, 2017
  14. Wulf

    Wulf Community Admin

    If they have any sort of reply to the player, they'd error.
     
  15. No SendReply, just /data folder management
    [DOUBLEPOST=1507170245][/DOUBLEPOST]So what would be the command to call it ?