Replies: 2 comments
-
|
Additionally, |
Beta Was this translation helpful? Give feedback.
-
|
I’m currently also missing a way to send a message directly to a player or to all players. Using import { Instance } from "cs_script/point_script";
Instance.OnPlayerChat((event) => {
let response = "[Response] " + event.text;
Instance.ServerCommand("say " + response);
});I was able to work around this issue in the following way: import { Instance } from "cs_script/point_script";
let response = "";
let ignore_message = "";
let message_time = 0;
Instance.OnPlayerChat((event) => {
if ( event.text === ignore_message ) return;
response = "[Response] " + event.text;
message_time = Instance.GetGameTime();
});
Instance.SetThink(() => {
if ( response !== "" && Instance.GetGameTime() > message_time + 0.5 ) {
Instance.ServerCommand("say " + response);
ignore_message = response;
response = "";
}
Instance.SetNextThink(Instance.GetGameTime());
});
Instance.SetNextThink(Instance.GetGameTime());However, this solution is not ideal either. What I’d really like is a way to send a message directly to the chat or HUD without it being attributed to any specific player. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Similar to
ClientPrintfrom TF2 vscript: It would print a message to a specified player, or null to broadcast to everyone. Currently the only alternative is doingInstance.ServerCommand("say message")Beta Was this translation helpful? Give feedback.
All reactions