From: Mircea Kitsune Date: Mon, 24 Oct 2011 12:46:46 +0000 (+0300) Subject: Implement a basic help system. X-Git-Tag: xonotic-v0.6.0~35^2~18^2~219 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7fc3e6f30bda6ec2f89ee905e6e1360f24b3fe22;p=xonotic%2Fxonotic-data.pk3dir.git Implement a basic help system. --- 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; }