From 7fc3e6f30bda6ec2f89ee905e6e1360f24b3fe22 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Mon, 24 Oct 2011 15:46:46 +0300 Subject: [PATCH] Implement a basic help system. --- qcsrc/server/mutators/sandbox.qc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index cd9b528a9..f9e4e633b 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -2,10 +2,19 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) { if(MUTATOR_RETURNVALUE) // command was already handled? return 0; - if(cmd_name == "g_sandbox" && cmd_argc >= 2) + if(cmd_name == "g_sandbox") { - print(strcat("Sandbox command received. Player sending the command is ", self.netname, "\n")); - return 1; + if(cmd_argc < 2) + { + print_to(self, "Sandbox mode is active. For more information, use 'g_sandbox help'"); + return 1; + } + + if(argv(1) == "help") + { + print_to(self, "You can use the following sandbox commands:"); + return 1; + } } return 0; } -- 2.39.2