aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
authorErlite <ys.aameziane@gmail.com>2022-11-12 15:09:43 +0100
committerGitHub <noreply@github.com>2022-11-12 14:09:43 +0000
commit3b02ecd43c2c1efd6e2d966b9659e4268dc1bbc5 (patch)
treedd5e91f4f25143deae7c77f96d7bb40eb1ec90db /Northstar.CustomServers/mod/scripts/vscripts
parent85d771e8f971a2ab2a1aca751c51a8202a3dd355 (diff)
downloadNorthstarMods-3b02ecd43c2c1efd6e2d966b9659e4268dc1bbc5.tar.gz
NorthstarMods-3b02ecd43c2c1efd6e2d966b9659e4268dc1bbc5.zip
Add support for hiding the [SERVER] tag in server messages (#506)
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_chat.gnut8
1 files changed, 4 insertions, 4 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_chat.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_chat.gnut
index 97ed959c..44836bc9 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_chat.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_chat.gnut
@@ -25,26 +25,26 @@ void function Chat_PrivateMessage(entity fromPlayer, entity toPlayer, string tex
}
// Broadcasts a message from the server to all players.
-void function Chat_ServerBroadcast(string text)
+void function Chat_ServerBroadcast(string text, bool withServerTag = true)
{
NSBroadcastMessage(
-1,
-1,
text,
- false,
+ !withServerTag,
false,
eChatMessageType.CHAT
)
}
// Sends a message from the server to one player. Will be shown as a whisper if whisper is set.
-void function Chat_ServerPrivateMessage(entity toPlayer, string text, bool whisper)
+void function Chat_ServerPrivateMessage(entity toPlayer, string text, bool whisper, bool withServerTag = true)
{
NSBroadcastMessage(
-1,
toPlayer.GetPlayerIndex(),
text,
- false,
+ !withServerTag,
false,
whisper ? eChatMessageType.WHISPER : eChatMessageType.CHAT
)