Lua function to set a server message on screen.
◆ Implementation()
| void RoomService.SetServerMessage.Implementation |
( |
string | message, |
|
|
float | time ) |
|
inlineprivate |
Usage:
Lua function to set a server message on screen.
Definition RoomServiceLuaFunctions.cs:573
Definition MyPluginInfo.cs:2
Supports Rich Text
- Parameters
-
| message | The message to display on the server. |
| time | The duration in seconds to display the message. 0 is a persistant display |
Source Code
590 {
591 if (!RoomServiceUtils.IsOnlineHost())
592 {
593 return;
594 }
595
596 if (string.IsNullOrEmpty(message.Trim()))
597 {
598 return;
599 }
600
601 ChatApi.SendMessage($"/servermessage white {time.ToString()} {message}");
602 }