Discussion in 'Rust Development' started by ZeusGOD, Sep 9, 2017.
mute id/nick 1d
how to 1d 1h 1m 1s ??
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>");
if (args.Length >= 2)
var target = rust.FindPlayer(args);
Length , args error how to fix?
What exactly is erroring about it?
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.
thank you !!!!
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.
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?)
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.
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.
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
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....
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
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...
Sorry, can you take a look at my source?
I do not know how to apply it because of different data method.
I can, if you'll post it. Better attach the whole plugin that you've done so far.