Solved Change global.say servername?
Discussion in 'Rust Development' started by Mikeyl, Feb 3, 2016.
-
Wulf Community Admin
You'd need a plugin to handle it if you are talking about sending the server name to the chat.
-
yes but a plugin that makes all global.say to like say [Crunshy] Hello insted of [SERVER]: Hello
I know that notifier can change it owns messages to like that but for like TimedExecute it sends SERVER i saw a comment in the threds there but idk how to make it work on all 3 and if it even work and if you could change it to what you want insted of SERVER
Code:foreach(var cmd in Config["TimerRepeat"] as Dictionary<string, object>) { repeater = timer.Repeat(Convert.ToSingle(cmd.Value), 0, () =>{ if(cmd.Key.Substring(0,3) == "say") PrintToChat($"{cmd.Key.Substring(3)}"); else ConsoleSystem.Run.Server.Normal(cmd.Key); Puts($"ran the command || " + cmd.Key.ToString()); }); }
-
Wulf Community Admin
Use Oxide's API:
Code:rust.BroadcastChat("Server Name", "Message");
-
-
Wulf Community Admin
-
"RealTime-Timer": {
"12:00:00": "rust.BroadcastChat("Crunshy", "Automated server restart in 6 Hours");",
Then it should work? -
Wulf Community Admin
-
Code:
void RunOnce() { if(chaintimer != null) { chaintimer.Destroy(); } if(Convert.ToBoolean(Config["EnableTimerOnce"]) == true) { foreach(var cmdc in Config["TimerOnce"] as Dictionary<string, object>) { chaintimer = timer.Once(Convert.ToSingle(cmdc.Value), () =>{ ConsoleSystem.Run.Server.Normal(cmdc.Key); Puts($"ran the command || " + cmdc.Key.ToString()); }); } } } void Unloaded()
Really sorry if i annoy you -
Wulf Community Admin
-
You can use this Easy Broadcast for Rust | Oxide
I have also written my own one in .lua called Anonymous admin. Where you can do /say and edit the "title" and colors. -
-
-
When you write "23:00:00": "global.say Automated server restart in 6 Hours.", it will broadcast with SERVER in it.
and that is what i am tryinf to avoid -
Wulf Community Admin
-
okay here i found what i was looking for i was afraid i was going to but it in the middle of the screen thats why i did not ttest this one mark this one as solved
Here for rest of you Better Say Command for Rust | Oxide