RoomService v2.3.1
Loading...
Searching...
No Matches
RoomService.SendChatMessage Class Reference

Lua function to send a chat message to all players.

Member Function Documentation

◆ Implementation()

void RoomService.SendChatMessage.Implementation ( string prefix,
string message )
inlineprivate

Usage:

RoomService.SendChatMessage("ByteBot", "Hello World");
Lua function to send a chat message to all players.
Definition RoomServiceLuaFunctions.cs:17
Definition MyPluginInfo.cs:2
Parameters
prefixThe prefix for the message.
messageThe content of the message.

Source Code

33 {
34 if (string.IsNullOrEmpty(prefix) || string.IsNullOrEmpty(message))
35 {
36 return;
37 }
38
39 if (!RoomServiceUtils.IsOnlineHost())
40 {
41 return;
42 }
43
44 ZeepkistNetwork.SendCustomChatMessage(true, 0, message, prefix);
45 }