From 3200e97a620f1c3481399cd9739f3748164005ac Mon Sep 17 00:00:00 2001 From: Samual Date: Mon, 19 Dec 2011 12:23:18 -0500 Subject: [PATCH] Add "localprint" command to send a hud centerprint to yourself via cl_cmd --- qcsrc/client/command/cl_cmd.qc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index 40ccfa781..a48a542ad 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -240,6 +240,30 @@ void LocalCommand_hud(float request, float argc) // TODO: Add aliases in command } } +void LocalCommand_localprint(float request, float argc) +{ + switch(request) + { + case CMD_REQUEST_COMMAND: + { + if(argv(1)) + { + centerprint_hud(argv(1)); + return; + } + } + + default: + print("Incorrect parameters for ^2localprint^7\n"); + case CMD_REQUEST_USAGE: + { + print("\nUsage:^3 cl_cmd localprint \"message\"\n"); + print(" 'message' is the centerprint message to send to yourself.\n"); + return; + } + } +} + void LocalCommand_mv_download(float request, float argc) { switch(request) @@ -365,6 +389,7 @@ void LocalCommand_(float request) CLIENT_COMMAND("debugmodel", LocalCommand_debugmodel(request, arguments), "Spawn a debug model manually") \ CLIENT_COMMAND("handlevote", LocalCommand_handlevote(request, arguments), "System to handle selecting a vote or option") \ CLIENT_COMMAND("hud", LocalCommand_hud(request, arguments), "Commands regarding/controlling the HUD system") \ + CLIENT_COMMAND("localprint", LocalCommand_localprint(request, arguments), "Create your own centerprint sent to yourself") \ CLIENT_COMMAND("mv_download", LocalCommand_mv_download(request, arguments), "Retrieve mapshot picture from the server") \ CLIENT_COMMAND("sendcvar", LocalCommand_sendcvar(request, arguments), "Send a cvar to the server (like weaponpriority)") \ CLIENT_COMMAND("settemp", LocalCommand_settemp(request, arguments), "Temporarily set a value to a cvar which is restored by command or end of each match") \ -- 2.39.2