1. mute id/nick 1d

    how to 1d 1h 1m 1s ??

    BasePlayer plz!
     
  2. [ConsoleCommand("mute")]
    private void InfoClose(ConsoleSystem.Arg args)
    {
    var player = args.Connection.player as BasePlayer;

    if (!permission.UserHasPermission(player.UserIDString, "fchat.mute"))
    {
    PrintToChat(player, "<color=red>당신은 권한이 없습니다!</color>");
    return;
    }

    if (args.Length >= 2)
    {

    var target = rust.FindPlayer(args[0]);

    Length , args[0] error how to fix?
     
  3. Wulf

    Wulf Community Admin

    What exactly is erroring about it?
     
  4. I assume your player would be NRE'ing if you're using it from RCON / Server console. Check if arg.Connection is null, same with the player.
     
  5. thank you !!!!
     
  6. Adding a DateTime.UtcNow to a mute command?

    While creating mute plug-ins

    I made it in seconds, but I have to make it every second, which is inconvenient.

    So I do not know how to add 1d1h1m1s functionality. Help me.

    I'm sorry I'm wrong in English (translate to Google)

    Of course, the other plugins are too complicated to understand.
     
  7. Ok, @ZeusGOD, take a look at this plugin: BetterChat Mute | Oxide, especcially it's function TryParseTimeSpan, line 441.
    Also - there is a bunch of mute plugins already(the one above, for example. it works both with BetterChat and without) so.... why even making one on your own? Or it's just for practise purpose?)
     
  8. It's because of my own Hangul plugin! The battle chat mute is an IPlayer, and I can not understand what IPlayer is talking about :(


    I tried with battle chat mute, but I can not understand which part of OnBetterChat is. Batter chat is too difficult.
     
  9. What are you talking about? Did you even look at the function I told you about? I've even pointed you to the exact line.... it has nothing to do about the IPlayer, it's exact answer to this thread.
     
  10. I am already seeing battle chat mute sources.

    Could it be steamed? This system is frustrating because I can not confirm it.

    if you can | Steam Community :: ZEUS_GOD | add me plz
     
  11. Dude you..... You've asked the question.... I can't post exact code here, it just simple doesn't belong to me. You already have your answer....
     
  12. Can you explain easily and briefly?

    Google translator status is strange.
    Anyway I have a problem now.

    Can you take a look at the source ??
    mutes [target.Id] = new MuteInfo (DateTime.UtcNow + timeSpan);
    I do not know how to change this to BasePlayer.

    And I do not know how to add it because it is different from the way I do data.

    I made a mute in seconds at the moment
    I am trying the 1d1h1m1s method.
    I just do not know what to do with the source :(
     
    Last edited by a moderator: Sep 16, 2017
  13. Dude. What are you talking about? Function TryParseTimeSpan would convert string "1d1h2m3s" to timespan. And that's all.
    About mutes [target.Id] = new MuteInfo (DateTime.UtcNow + timeSpan);, well. it depends on your MuteInfo(or simular) class, where you store mute information.
    mutes is a dictionary<string,muteinfo>. You can change it to Dictionary<ulong, MuteInfo> and store it like this:
    BasePlayer player = ...
    mutes[player.UserID] = new MuteInfo(...)
    Or don't change anything and to
    mutes[player.userIdString] = new MuteInfo(...)
    It really depends on your code.
    Post your plugin if you want overs to do it for you...
     
  14. Sorry, can you take a look at my source?

    I do not know how to apply it because of different data method.
     
    Last edited by a moderator: Sep 16, 2017
  15. I can, if you'll post it. Better attach the whole plugin that you've done so far.