(Difference between revisions)
Return to current revision
-
Gets called when a [wiki]Player[/wiki] sent a message.
[h="2"] Declaration [/h]
[highlight=cpp]
-
-
VAULTSCRIPT VAULTSPACE State OnPlayerChat(VAULTSPACE ID, VAULTSPACE RawString) _CPP(noexcept);
-
+
VAULTSCRIPT VAULTSPACE State OnPlayerChat(VAULTSPACE ID, VAULTSPACE RawString) VAULTCPP(noexcept);
-
[/highlight]
[highlight=c]
forward OnPlayerChat(ID, message{});
[/highlight]
[h="2"] Parameters [/h]
-
-
[b][wiki="ID"]ID[/wiki][/b] - the ID of the [wiki]Container[/wiki]
[b][wiki="RawString"]RawString[/wiki][/b] - the entered message. It is a [wiki]MAX_CHAT_LENGTH[/wiki] sized, modifiable buffer
-
+
[b][wiki="ID"]ID[/wiki][/b] - the ID of the [wiki]Player[/wiki]
[b][wiki="RawString"]RawString[/wiki][/b] - the entered message, which is a [wiki]MAX_CHAT_LENGTH[/wiki] sized, modifiable buffer
-
[h="2"] Return value [/h]
-
-
If returned [wiki]True[/wiki], the (updated) message will be sent to all clients. If returned [wiki]False[/wiki], the message is blocked.
-
+
If returned [wiki]True[/wiki], the (updated) message will be sent to all clients. If returned [wiki]False[/wiki], the message is ignored.
-
[category]VaultMP interface[/category]
[category]Scripting callbacks[/category]