aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp')
-rw-r--r--NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp b/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp
new file mode 100644
index 00000000..f3cb2f18
--- /dev/null
+++ b/NorthstarDLL/scripts/client/scriptservertoclientstringcommand.cpp
@@ -0,0 +1,19 @@
+#include "pch.h"
+#include "squirrel/squirrel.h"
+#include "core/convar/convar.h"
+#include "core/convar/concommand.h"
+
+void ConCommand_ns_script_servertoclientstringcommand(const CCommand& arg)
+{
+ if (g_pSquirrel<ScriptContext::CLIENT>->m_pSQVM)
+ g_pSquirrel<ScriptContext::CLIENT>->Call("NSClientCodeCallback_RecievedServerToClientStringCommand", arg.ArgS());
+}
+
+ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ScriptServerToClientStringCommand, ClientSquirrel, (CModule module))
+{
+ RegisterConCommand(
+ "ns_script_servertoclientstringcommand",
+ ConCommand_ns_script_servertoclientstringcommand,
+ "",
+ FCVAR_CLIENTDLL | FCVAR_SERVER_CAN_EXECUTE);
+}