From 939744d4779ea02689725129337e74ea12993f0c Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 10 Feb 2021 02:44:27 +0100 Subject: [PATCH] Standardize command usage messages: argument: keyword : input parameter "": input string that can contain multiple words When an argument is enclosed by [] it means it's optional While at it fix cmd voice, improve menu_cmd, menu_cmd directmenu and cl_cmd hud --- qcsrc/client/command/cl_cmd.qc | 22 +++++------ qcsrc/common/command/generic.qc | 22 +++++------ qcsrc/common/command/rpn.qc | 2 +- qcsrc/common/debug.qh | 4 +- qcsrc/common/effects/effectinfo.qc | 2 +- qcsrc/common/items/all.qh | 2 +- qcsrc/common/notifications/all.qh | 2 +- qcsrc/common/turrets/all.qh | 2 +- qcsrc/common/weapons/all.qc | 2 +- qcsrc/common/weapons/all.qh | 2 +- qcsrc/menu/command/menu_cmd.qc | 11 +++--- qcsrc/server/cheats.qc | 26 ++++++------ qcsrc/server/command/banning.qc | 10 ++--- qcsrc/server/command/cmd.qc | 63 +++++++++++++++--------------- qcsrc/server/command/common.qc | 4 +- qcsrc/server/command/sv_cmd.qc | 42 ++++++++++---------- qcsrc/server/command/vote.qc | 12 +++--- 17 files changed, 115 insertions(+), 115 deletions(-) diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index 15419f966..2df0b8372 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -108,9 +108,9 @@ void LocalCommand_boxparticles(int request, int argc) case CMD_REQUEST_USAGE: { LOG_HELP( - "Usage:^3 cl_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n" + "Usage:^3 cl_cmd boxparticles \n" " 'effectname' is the name of a particle effect in effectinfo.txt\n" - " 'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n" + " 'owner' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n" " 'org_from' is the starting origin of the box\n" " 'org_to' is the ending origin of the box\n" " 'dir_from' is the minimum velocity\n" @@ -160,7 +160,7 @@ void LocalCommand_create_scrshot_ent(int request) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 cl_cmd create_scrshot_ent [path]"); + LOG_HELP("Usage:^3 cl_cmd create_scrshot_ent []"); LOG_HELP(" Where 'path' can be the subdirectory of data/data in which the file is saved."); return; } @@ -190,7 +190,7 @@ void LocalCommand_debugmodel(int request, int argc) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 cl_cmd debugmodel model"); + LOG_HELP("Usage:^3 cl_cmd debugmodel "); LOG_HELP(" Where 'model' is a string of the model name to use for the debug model."); return; } @@ -238,7 +238,7 @@ void LocalCommand_handlevote(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 cl_cmd handlevote vote"); + LOG_HELP("Usage:^3 cl_cmd handlevote "); LOG_HELP(" Where 'vote' is the selection for either the current poll or uid2name."); return; } @@ -328,11 +328,11 @@ void LocalCommand_hud(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 cl_cmd hud action [configname | radartoggle | layout]"); + LOG_HELP("Usage:^3 cl_cmd hud [ | | ]"); LOG_HELP(" Where 'action' is the command to complete,"); LOG_HELP(" 'configname' is the name to save to for \"save\" action,"); - LOG_HELP(" 'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,"); - LOG_HELP(" and 'layout' is how to organize the scoreboard columns for the set action."); + LOG_HELP(" 'radartoggle' is to maximize/minimize radar for \"radar\" action,"); + LOG_HELP(" and 'layout' is how to organize the scoreboard columns for \"scoreboard_columns_set\" action."); LOG_HELP(" Full list of commands here: \"configure, quickmenu, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\""); return; } @@ -382,7 +382,7 @@ void LocalCommand_mv_download(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 cl_cmd mv_download mapid"); + LOG_HELP("Usage:^3 cl_cmd mv_download "); LOG_HELP(" Where 'mapid' is the id number of the map to request an image of on the map vote selection menu."); return; } @@ -518,8 +518,8 @@ void GameCommand(string command) LOG_HELP("\nGeneric commands shared by all programs:"); GenericCommand_macro_help(); - LOG_HELP("\nUsage:^3 cl_cmd COMMAND...^7, where possible commands are listed above."); - LOG_HELP("For help about a specific command, type cl_cmd help COMMAND"); + LOG_HELP("\nUsage:^3 cl_cmd ^7, where possible commands are listed above."); + LOG_HELP("For help about a specific command, type cl_cmd help "); return; } diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index e354a9a59..f8189b9a4 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -89,8 +89,8 @@ void GenericCommand_addtolist(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " addtolist variable value"); - LOG_HELP(" Where 'variable' is what to add 'value' to."); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " addtolist "); + LOG_HELP(" Where 'cvar' is the cvar to add 'value' to."); LOG_HELP("See also: ^2removefromlist^7"); return; } @@ -163,7 +163,7 @@ void GenericCommand_qc_curl(int request, int argc) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key ] [--cvar] [--exec] []"); return; } } @@ -303,9 +303,9 @@ void GenericCommand_maplist(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " maplist action [map]"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " maplist []"); LOG_HELP(" Where 'action' is the command to complete,"); - LOG_HELP(" and 'map' is what it acts upon (if required)."); + LOG_HELP(" and 'map' is what it acts upon (for the 'add' and 'remove' actions)."); LOG_HELP(" Full list of commands here: \"add, cleanup, remove, shuffle.\""); return; } @@ -325,8 +325,8 @@ void GenericCommand_nextframe(int request, string command) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " nextframe command..."); - LOG_HELP(" Where command will be executed next frame of this VM"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " nextframe "); + LOG_HELP(" Where 'command' will be executed next frame of this VM"); return; } } @@ -359,8 +359,8 @@ void GenericCommand_removefromlist(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value"); - LOG_HELP(" Where 'variable' is what cvar to remove 'value' from."); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " removefromlist "); + LOG_HELP(" Where 'cvar' is the cvar to remove 'value' from."); LOG_HELP("See also: ^2addtolist^7"); return; } @@ -447,7 +447,7 @@ void GenericCommand_settemp(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " settemp \"cvar\" \"arguments\""); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " settemp \"\""); LOG_HELP(" Where 'cvar' is the cvar you want to temporarily set with 'arguments'."); LOG_HELP("See also: ^2settemp_restore^7"); return; @@ -502,7 +502,7 @@ void GenericCommand_runtest(int request, int argc) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " [function to run]"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " "); return; } } diff --git a/qcsrc/common/command/rpn.qc b/qcsrc/common/command/rpn.qc index 467768269..7c944aa0f 100644 --- a/qcsrc/common/command/rpn.qc +++ b/qcsrc/common/command/rpn.qc @@ -570,7 +570,7 @@ LABEL(skip_difference) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " rpn EXPRESSION..."); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " rpn "); LOG_HELP(" Operator description (x: string, s: set, f: float):"); LOG_HELP(" x pop -----------------------------> : removes the top"); LOG_HELP(" x dup -----------------------------> x x : duplicates the top"); diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 5d92a5a63..af173c61e 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -213,7 +213,7 @@ GENERIC_COMMAND(bufstr_get, "Examine a string buffer object", false) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " bufstr_get bufhandle string_index"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " bufstr_get "); return; } } @@ -358,7 +358,7 @@ GENERIC_COMMAND(findent, "Search through entities for matching classname", false LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 " GetProgramCommandPrefix() " find classname"); + LOG_HELP("Usage:^3 " GetProgramCommandPrefix() " find "); LOG_HELP(" Where 'classname' is the classname to search for."); return; } diff --git a/qcsrc/common/effects/effectinfo.qc b/qcsrc/common/effects/effectinfo.qc index 1e23bb46f..c0baddeb3 100644 --- a/qcsrc/common/effects/effectinfo.qc +++ b/qcsrc/common/effects/effectinfo.qc @@ -313,7 +313,7 @@ GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt", fa } default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo [filename]"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo []"); LOG_HELP(" Where 'filename' is the file to write (default is effectinfo_dump.txt),"); LOG_HELP(" if supplied with '-' output to console as well as default,"); LOG_HELP(" if left blank, it will only write to default."); diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index bb2e387fb..3d3d62e46 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -41,7 +41,7 @@ GENERIC_COMMAND(dumpitems, "Dump all items to the console", false) { } default: case CMD_REQUEST_USAGE: { - LOG_HELPF("Usage:^3 %s dumpitems", GetProgramCommandPrefix()); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpitems"); return; } } diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 72017e3dc..009b76c0b 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -198,7 +198,7 @@ GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt" default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpnotifs []"); LOG_HELP(" Where 'filename' is the file to write (default is notifications_dump.cfg),"); LOG_HELP(" if supplied with '-' output to console as well as default,"); LOG_HELP(" if left blank, it will only write to default."); diff --git a/qcsrc/common/turrets/all.qh b/qcsrc/common/turrets/all.qh index e44c5d9b5..d9f5ce867 100644 --- a/qcsrc/common/turrets/all.qh +++ b/qcsrc/common/turrets/all.qh @@ -100,7 +100,7 @@ GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt", false) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpturrets []"); LOG_HELP(" Where 'filename' is the file to write (default is turrets_dump.cfg),"); LOG_HELP(" if supplied with '-' output to console as well as default,"); LOG_HELP(" if left blank, it will only write to default."); diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 50ee6a2ab..c146bc3f3 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -654,7 +654,7 @@ CLIENT_COMMAND(weapon_find, "Show spawn locations of a weapon") LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 cl_cmd weapon_find weapon"); + LOG_HELP("Usage:^3 cl_cmd weapon_find "); LOG_HELP(" Where 'weapon' is the lowercase weapon name, 'all' or 'unowned'."); return; } diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 479c0b6b3..9ca40e73d 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -82,7 +82,7 @@ GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt", false) // default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons []"); LOG_HELP(" Where 'filename' is the file to write (default is weapons_dump.cfg),"); LOG_HELP(" if supplied with '-' output to console as well as default,"); LOG_HELP(" if left blank, it will only write to default."); diff --git a/qcsrc/menu/command/menu_cmd.qc b/qcsrc/menu/command/menu_cmd.qc index bb55a671b..6bab3ed8e 100644 --- a/qcsrc/menu/command/menu_cmd.qc +++ b/qcsrc/menu/command/menu_cmd.qc @@ -45,10 +45,11 @@ void GameCommand(string theCommand) if (argv(0) == "help" || argc == 0) { - LOG_HELP(_("Usage: menu_cmd command..., where possible commands are:")); - LOG_HELP(_(" sync - reloads all cvars on the current menu page")); - LOG_HELP(_(" directmenu ITEM - select a menu item as main item")); - LOG_HELP(_(" dumptree - dump the state of the menu as a tree to the console")); + LOG_HELP(_("Usage:^3 menu_cmd [], where possible commands are:")); + LOG_HELP(_(" 'sync' reloads all cvars on the current menu page")); + LOG_HELP(_(" 'directmenu' shows the menu window named 'item' (or the menu window containing an item named 'item')")); + LOG_HELP(_(" if 'item' is not specified it shows the list of available items in the console")); + LOG_HELP(_(" 'dumptree' dumps the state of the menu as a tree to the console")); LOG_HELP("\nGeneric commands shared by all programs:"); GenericCommand_macro_help(); @@ -77,7 +78,7 @@ void GameCommand(string theCommand) if (argc == 1) { - LOG_HELP(_("Available options:")); + LOG_HELP(_("Available items:")); FOREACH_ENTITY_ORDERED(it.name != "", { if (it.classname == "vtbl") continue; diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 3506aa7b7..edf15e473 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -300,11 +300,6 @@ float CheatCommand(entity this, int argc) IS_CHEAT(this, 0, argc, 0); if(argc == 5) { - // arguments: - // effectname - // origin (0..1, on crosshair line) - // velocity - // howmany f = stof(argv(2)); crosshair_trace(this); start = (1-f) * this.origin + f * trace_endpos; @@ -314,7 +309,9 @@ float CheatCommand(entity this, int argc) DID_CHEAT(); break; } - sprint(this, "Usage: sv_cheats 1; restart; cmd pointparticles effectname position(0..1) velocityvector multiplier\n"); + sprint(this, "Usage:^3 sv_cheats 1; restart; cmd pointparticles \n"); + sprint(this, " Where 'position' is a number from 0 to 1 representing distance on the crosshair line,\n"); + sprint(this, " and 'velocity' is a vector \"x y z\"\n"); break; case "trailparticles": IS_CHEAT(this, 0, argc, 0); @@ -329,14 +326,12 @@ float CheatCommand(entity this, int argc) DID_CHEAT(); break; } - sprint(this, "Usage: sv_cheats 1; restart; cmd trailparticles effectname\n"); + sprint(this, "Usage: sv_cheats 1; restart; cmd trailparticles \n"); break; case "make": IS_CHEAT(this, 0, argc, 0); if(argc == 3) { - // arguments: - // modelname mode f = stof(argv(2)); W_SetupShot(this, weaponentities[0], false, false, SND_Null, CH_WEAPON_A, 0, 0); traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, this); @@ -375,7 +370,10 @@ float CheatCommand(entity this, int argc) } } else - sprint(this, "Usage: sv_cheats 1; restart; cmd make models/... 0/1/2\n"); + { + sprint(this, "Usage:^3 sv_cheats 1; restart; cmd make \n"); + sprint(this, " where 'mode' can be 0, 1 or 2\n"); + } break; case "penalty": IS_CHEAT(this, 0, argc, 0); @@ -385,7 +383,7 @@ float CheatCommand(entity this, int argc) DID_CHEAT(); break; } - sprint(this, "Usage: sv_cheats 1; restart; cmd penalty 5.0 AHAHAHAHAHAHAH))\n"); + sprint(this, "Usage:^3 sv_cheats 1; restart; cmd penalty ))\n"); break; case "dragbox_spawn": { IS_CHEAT(this, 0, argc, 0); @@ -510,7 +508,7 @@ float CheatCommand(entity this, int argc) DID_CHEAT(); break; } - sprint(this, "Usage: sv_cheats 1; restart; cmd dragbox_setcnt cnt\n"); + sprint(this, "Usage:^3 sv_cheats 1; restart; cmd dragbox_setcnt \n"); break; case "drag_save": IS_CHEAT(this, 0, argc, 0); @@ -530,7 +528,7 @@ float CheatCommand(entity this, int argc) DID_CHEAT(); break; } - sprint(this, "Usage: sv_cheats 1; restart; cmd dragbox_save filename\n"); + sprint(this, "Usage:^3 sv_cheats 1; restart; cmd dragbox_save \n"); break; case "drag_saveraceent": IS_CHEAT(this, 0, argc, 0); @@ -599,7 +597,7 @@ float CheatCommand(entity this, int argc) DID_CHEAT(); break; } - sprint(this, "Usage: sv_cheats 1; restart; cmd dragbox_save filename\n"); + sprint(this, "Usage:^3 sv_cheats 1; restart; cmd dragbox_save \n"); break; case "drag_clear": IS_CHEAT(this, 0, argc, 0); diff --git a/qcsrc/server/command/banning.qc b/qcsrc/server/command/banning.qc index 99a7756e1..728c344a1 100644 --- a/qcsrc/server/command/banning.qc +++ b/qcsrc/server/command/banning.qc @@ -41,7 +41,7 @@ void BanCommand_ban(int request, int argc, string command) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd ban address [bantime] [reason]"); + LOG_HELP("Usage:^3 sv_cmd ban
[] []"); LOG_HELP(" 'address' is the IP address or range of the player to ban,"); LOG_HELP(" 'bantime' is the amount of time that the ban is active (default if not provided),"); LOG_HELP(" and 'reason' is the string to label the ban with as reason for banning."); @@ -108,7 +108,7 @@ void BanCommand_kickban(int request, int argc, string command) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd kickban client [bantime] [masksize] [reason]"); + LOG_HELP("Usage:^3 sv_cmd kickban [] [] []"); LOG_HELP(" 'client' is the entity number or name of the player to ban,"); LOG_HELP(" 'bantime' is the amount of time that the ban is active (default if not provided),"); LOG_HELP(" 'masksize' is the range of the IP address (1-thru-4, default if not provided),"); @@ -146,7 +146,7 @@ void BanCommand_mute(int request, int argc, string command) // TODO: Add a sort LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd mute client"); + LOG_HELP("Usage:^3 sv_cmd mute "); LOG_HELP(" 'client' is the entity number or name of the player to mute."); LOG_HELP("See also: ^2unmute^7"); return; @@ -192,7 +192,7 @@ void BanCommand_unban(int request, int argc) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd unban banid"); + LOG_HELP("Usage:^3 sv_cmd unban "); LOG_HELP(" Where 'banid' is the ID of the ban of which to remove."); LOG_HELP("See also: ^2ban, banlist, kickban^7"); return; @@ -227,7 +227,7 @@ void BanCommand_unmute(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd unmute client"); + LOG_HELP("Usage:^3 sv_cmd unmute "); LOG_HELP(" 'client' is the entity number or name of the player to unmute."); LOG_HELP("See also: ^2mute^7"); return; diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 362847554..b9acbfddf 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -83,7 +83,7 @@ void ClientCommand_autoswitch(entity caller, int request, int argc) sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd autoswitch selection\n"); + sprint(caller, "\nUsage:^3 cmd autoswitch \n"); sprint(caller, " Where 'selection' controls if autoswitch is on or off.\n"); return; } @@ -126,7 +126,7 @@ void ClientCommand_clientversion(entity caller, int request, int argc) // inter sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd clientversion version\n"); + sprint(caller, "\nUsage:^3 cmd clientversion \n"); sprint(caller, " Where 'version' is the game version reported by caller.\n"); return; } @@ -151,7 +151,7 @@ void ClientCommand_mv_getpicture(entity caller, int request, int argc) // inter sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd mv_getpicture mapid\n"); + sprint(caller, "\nUsage:^3 cmd mv_getpicture \n"); sprint(caller, " Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n"); return; } @@ -241,29 +241,29 @@ void ClientCommand_wpeditor(entity caller, int request, int argc) sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd wpeditor action\n"); + sprint(caller, "\nUsage:^3 cmd wpeditor \n"); sprint(caller, " Where 'action' can be:\n"); - sprint(caller, " ^5spawn^7: spawns a waypoint at player's position\n"); - sprint(caller, " ^5remove^7: removes player's nearest waypoint\n"); - sprint(caller, " ^5unreachable^7: reveals waypoints and items unreachable from the current position and spawnpoints without a nearest waypoint\n"); - sprint(caller, " ^5saveall^7: saves all waypoints and links to file\n"); - sprint(caller, " ^5relinkall^7: relinks all waypoints as if they were respawned\n"); - sprint(caller, " ^5spawn crosshair^7: spawns a waypoint at crosshair's position\n"); + sprint(caller, " ^2spawn^7: spawns a waypoint at player's position\n"); + sprint(caller, " ^2remove^7: removes player's nearest waypoint\n"); + sprint(caller, " ^2unreachable^7: reveals waypoints and items unreachable from the current position and spawnpoints without a nearest waypoint\n"); + sprint(caller, " ^2saveall^7: saves all waypoints and links to file\n"); + sprint(caller, " ^2relinkall^7: relinks all waypoints as if they were respawned\n"); + sprint(caller, " ^2spawn crosshair^7: spawns a waypoint at crosshair's position\n"); sprint(caller, " ^7 in general useful to create special and hardwired links with ease from existing waypoints\n"); sprint(caller, " ^7 in particular it's the only way to create custom jumppad waypoints (spawn another waypoint to create destination))\n"); - sprint(caller, " ^5spawn jump^7: spawns a jump waypoint (place it at least 60 qu before jump start, spawn another waypoint to create destination)\n"); - sprint(caller, " ^5spawn crouch^7: spawns a crouch waypoint (it links only to very close waypoints)\n"); - sprint(caller, " ^5spawn support^7: spawns a support waypoint (spawn another waypoint to create destination from which all incoming links are removed)\n"); + sprint(caller, " ^2spawn jump^7: spawns a jump waypoint (place it at least 60 qu before jump start, spawn another waypoint to create destination)\n"); + sprint(caller, " ^2spawn crouch^7: spawns a crouch waypoint (it links only to very close waypoints)\n"); + sprint(caller, " ^2spawn support^7: spawns a support waypoint (spawn another waypoint to create destination from which all incoming links are removed)\n"); sprint(caller, " ^7 useful to replace links to problematic jumppad/teleport waypoints\n"); - sprint(caller, " ^5hardwire^7: marks the nearest waypoint as origin of a new hardwired link (spawn another waypoint over an existing one to create destination)\n"); - sprint(caller, " ^5hardwire crosshair^7: marks the waypoint at crosshair instead of the nearest waypoint\n"); - sprint(caller, " ^5lock^7: locks link display of the aimed waypoint (unlocks if no waypoint is found at crosshair's position)\n"); - sprint(caller, " ^5symorigin get|set\n"); - sprint(caller, " ^5symorigin get|set p1 p2 ... pX\n"); - sprint(caller, " ^5symaxis get|set p1 p2\n"); - sprint(caller, " ^7 where p1 p2 ... pX are positions (\"x y z\", z can be omitted) that you know are perfectly symmetrical" + sprint(caller, " ^2hardwire^7: marks the nearest waypoint as origin of a new hardwired link (spawn another waypoint over an existing one to create destination)\n"); + sprint(caller, " ^2hardwire crosshair^7: marks the waypoint at crosshair instead of the nearest waypoint\n"); + sprint(caller, " ^2lock^7: locks link display of the aimed waypoint (unlocks if no waypoint is found at crosshair's position)\n"); + sprint(caller, " ^2symorigin get|set\n"); + sprint(caller, " ^2symorigin get|set ... \n"); + sprint(caller, " ^2symaxis get|set \n"); + sprint(caller, " ^7 where ... are positions (\"x y z\", z can be omitted) that you know are perfectly symmetrical" " so you can determine origin/axis of symmetry of maps without ctf flags or where flags aren't perfectly symmetrical\n"); - sprint(caller, " See 'wpeditor_menu' for a selectable list of various commands and useful settings to edit waypoints.\n"); + sprint(caller, " See ^5wpeditor_menu^7 for a selectable list of various commands and useful settings to edit waypoints.\n"); return; } } @@ -528,7 +528,7 @@ void ClientCommand_selectteam(entity caller, int request, int argc) sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd selectteam team\n"); + sprint(caller, "\nUsage:^3 cmd selectteam \n"); sprint(caller, " Where 'team' is the prefered team to try and join.\n"); sprint(caller, " Full list of options here: \"red, blue, yellow, pink, auto\"\n"); return; @@ -619,7 +619,7 @@ void ClientCommand_spectate(entity caller, int request) sprint(caller, "Can't spectate ", argv(1), "^7\n"); } else - sprint(caller, "cmd spectate client only works when you are spectator/observer\n"); + sprint(caller, "cmd spectate only works when you are spectator/observer\n"); return; } @@ -637,7 +637,7 @@ void ClientCommand_spectate(entity caller, int request) default: case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd spectate [client]\n"); + sprint(caller, "\nUsage:^3 cmd spectate []\n"); sprint(caller, " Where 'client' can be the player to spectate.\n"); return; } @@ -661,7 +661,7 @@ void ClientCommand_suggestmap(entity caller, int request, int argc) sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd suggestmap map\n"); + sprint(caller, "\nUsage:^3 cmd suggestmap \n"); sprint(caller, " Where 'map' is the name of the map to suggest.\n"); return; } @@ -718,7 +718,7 @@ void ClientCommand_tell(entity caller, int request, int argc, string command) sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd tell client \n"); + sprint(caller, "\nUsage:^3 cmd tell \n"); sprint(caller, " Where 'client' is the entity number or name of the player to send 'message' to.\n"); return; } @@ -764,9 +764,10 @@ void ClientCommand_voice(entity caller, int request, int argc, string command) sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd voice messagetype \n"); - sprint(caller, " 'messagetype' is the type of broadcast to do, like team only or such,\n"); - sprint(caller, " and 'soundname' is the string/filename of the sound/voice message to play.\n"); + sprint(caller, "\nUsage:^3 cmd voice []\n"); + sprint(caller, " 'voicetype' is the type of voice message, it can be one of these:\n"); + sprint(caller, sprintf(" %s\n", allvoicesamples)); + sprint(caller, " and 'message' is the text message to send.\n"); return; } } @@ -918,8 +919,8 @@ void SV_ParseClientCommand(entity this, string command) sprint(this, "\nCommon networked commands:\n"); CommonCommand_macro_help(this); - sprint(this, "\nUsage:^3 cmd COMMAND...^7, where possible commands are listed above.\n"); - sprint(this, "For help about a specific command, type cmd help COMMAND\n"); + sprint(this, "\nUsage:^3 cmd ^7, where possible commands are listed above.\n"); + sprint(this, "For help about a specific command, type cmd help \n"); return; } else if (CommonCommand_macro_usage(argc, this)) // Instead of trying to call a command, we're going to see detailed information about it diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 5dff9f5f5..34088bd9d 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -463,7 +463,7 @@ void CommonCommand_editmob(int request, entity caller, int argc) default: case CMD_REQUEST_USAGE: { - print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " editmob command [arguments]")); + print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " editmob []")); print_to(caller, " Where 'command' can be butcher spawn skin movetarget kill name"); print_to(caller, " spawn, skin, movetarget and name require 'arguments'"); print_to(caller, " spawn also takes arguments list and random"); @@ -831,7 +831,7 @@ void CommonCommand_who(int request, entity caller, int argc) default: case CMD_REQUEST_USAGE: { - print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " who [separator]")); + print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " who []")); print_to(caller, " Where 'separator' is the optional string to separate the values with, default is a space."); return; } diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 508b8b6b9..a8f83956e 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -144,7 +144,7 @@ void GameCommand_adminmsg(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd adminmsg clients \"message\" [infobartime]"); + LOG_HELP("Usage:^3 sv_cmd adminmsg \"\" []"); LOG_HELP(" 'clients' is a list (separated by commas) of player entity ID's or nicknames"); LOG_HELP(" If infobartime is provided, the message will be sent to infobar."); LOG_HELP(" Otherwise, it will just be sent as a centerprint message."); @@ -196,7 +196,7 @@ void GameCommand_allspec(int request, int argc) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd allspec [reason]"); + LOG_HELP("Usage:^3 sv_cmd allspec []"); LOG_HELP(" Where 'reason' is an optional argument for explanation of allspec command."); LOG_HELP("See also: ^2moveplayer, shuffleteams^7"); return; @@ -228,7 +228,7 @@ void GameCommand_anticheat(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd anticheat client"); + LOG_HELP("Usage:^3 sv_cmd anticheat "); LOG_HELP(" 'client' is the entity number or name of the player."); return; } @@ -430,10 +430,10 @@ void GameCommand_bot_cmd(int request, int argc, string command) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd bot_cmd client command [argument]"); + LOG_HELP("Usage:^3 sv_cmd bot_cmd []"); LOG_HELP(" 'client' can be either the name of the bot or a progressive number (not the entity number!)"); LOG_HELP(" can also be '*' or 'all' to allow sending the command to all the bots"); - LOG_HELP(" For full list of commands, see bot_cmd help [command]."); + LOG_HELP(" For full list of commands, see bot_cmd help []."); LOG_HELP("Examples: sv_cmd bot_cmd 1 cc \"say something\""); LOG_HELP(" sv_cmd bot_cmd 1 presskey jump"); LOG_HELP(" sv_cmd bot_cmd * pause"); @@ -459,7 +459,7 @@ void GameCommand_cointoss(int request, int argc) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd cointoss [result1 result2]"); + LOG_HELP("Usage:^3 sv_cmd cointoss [ ]"); LOG_HELP(" Where 'result1' and 'result2' are user created options."); return; } @@ -500,7 +500,7 @@ void GameCommand_database(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd database action filename"); + LOG_HELP("Usage:^3 sv_cmd database "); LOG_HELP(" Where 'action' is the command to complete,"); LOG_HELP(" and 'filename' is what it acts upon."); LOG_HELP(" Full list of commands here: \"save, dump, load.\""); @@ -538,7 +538,7 @@ void GameCommand_defer_clear(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd defer_clear client"); + LOG_HELP("Usage:^3 sv_cmd defer_clear "); LOG_HELP(" 'client' is the entity number or name of the player."); LOG_HELP("See also: ^2defer_clear_all^7"); return; @@ -593,7 +593,7 @@ void GameCommand_delrec(int request, int argc) // perhaps merge later with reco LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd delrec ranking [map]"); + LOG_HELP("Usage:^3 sv_cmd delrec []"); LOG_HELP(" 'ranking' is which ranking level to clear up to, "); LOG_HELP(" it will clear all records up to nth place."); LOG_HELP(" if 'map' is not provided it will use current map."); @@ -751,7 +751,7 @@ void GameCommand_gametype(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd gametype mode"); + LOG_HELP("Usage:^3 sv_cmd gametype "); LOG_HELP(" Where 'mode' is the gametype mode to switch to."); LOG_HELP("See also: ^2gotomap^7"); return; @@ -817,7 +817,7 @@ void GameCommand_gettaginfo(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd gettaginfo model frame index [command one] [command two]"); + LOG_HELP("Usage:^3 sv_cmd gettaginfo [] []"); LOG_HELP("See also: ^2bbox, trace^7"); return; } @@ -900,7 +900,7 @@ void GameCommand_gotomap(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd gotomap map"); + LOG_HELP("Usage:^3 sv_cmd gotomap "); LOG_HELP(" Where 'map' is the *.bsp file to change to."); LOG_HELP("See also: ^2gametype^7"); return; @@ -1097,7 +1097,7 @@ void GameCommand_moveplayer(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd moveplayer clients destination"); + LOG_HELP("Usage:^3 sv_cmd moveplayer "); LOG_HELP(" 'clients' is a list (separated by commas) of player entity ID's or nicknames"); LOG_HELP(" 'destination' is what to send the player to, be it team or spectating"); LOG_HELP(" Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\""); @@ -1222,7 +1222,7 @@ void GameCommand_setbots(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd setbots botnumber"); + LOG_HELP("Usage:^3 sv_cmd setbots "); LOG_HELP(" Where 'botnumber' is the amount of bots to set bot_number cvar to."); LOG_HELP("See also: ^2bot_cmd^7"); return; @@ -1333,7 +1333,7 @@ void GameCommand_stuffto(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd stuffto client \"command\""); + LOG_HELP("Usage:^3 sv_cmd stuffto \"\""); LOG_HELP(" 'client' is the entity number or name of the player,"); LOG_HELP(" and 'command' is the command to be sent to that player."); return; @@ -1514,9 +1514,9 @@ void GameCommand_trace(int request, int argc) LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0)); case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd trace command [startpos endpos] [endpos_height]"); - LOG_HELP(" Where startpos and endpos are parameters for 'walk' and 'showline' commands,"); - LOG_HELP(" 'endpos_height' is an optional parameter for 'walk' command,"); + LOG_HELP("Usage:^3 sv_cmd trace [ ] []"); + LOG_HELP(" Where startpos and endpos are parameters for the 'walk' and 'showline' commands,"); + LOG_HELP(" 'endpos_height' is an optional parameter for the 'walk' command,"); LOG_HELP(" Full list of commands here: \"debug, debug2, walk, showline.\""); LOG_HELP("See also: ^2bbox, gettaginfo^7"); return; @@ -1582,7 +1582,7 @@ void GameCommand_warp(int request, int argc) default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 sv_cmd warp [level]"); + LOG_HELP("Usage:^3 sv_cmd warp []"); LOG_HELP(" 'level' is the level to change campaign mode to."); LOG_HELP(" if 'level' is not provided it will change to the next level."); return; @@ -1711,8 +1711,8 @@ void GameCommand(string command) LOG_HELP("\nGeneric commands shared by all programs:"); GenericCommand_macro_help(); - LOG_HELP("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n" - "For help about a specific command, type sv_cmd help COMMAND"); + LOG_HELP("\nUsage:^3 sv_cmd ^7, where possible commands are listed above.\n" + "For help about a specific command, type sv_cmd help "); return; } diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 746630aec..489810908 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -897,7 +897,7 @@ void VoteCommand_call(int request, entity caller, int argc, string vote_command) default: case CMD_REQUEST_USAGE: { - print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote call command")); + print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote call ")); print_to(caller, " Where 'command' is the command to request a vote upon."); print_to(caller, strcat("Examples: ", GetCommandPrefix(caller), " vote call gotomap dance")); print_to(caller, strcat(" ", GetCommandPrefix(caller), " vote call endmatch")); @@ -1013,9 +1013,9 @@ void VoteCommand_master(int request, entity caller, int argc, string vote_comman default: case CMD_REQUEST_USAGE: { - print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote master [action [command | password]]")); - print_to(caller, " If action is left blank, it calls a vote for you to become master."); - print_to(caller, " Otherwise the actions are either 'do' a command or 'login' as master."); + print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote master [ [ | ]]")); + print_to(caller, " If 'action' is left blank, it calls a vote for you to become master."); + print_to(caller, " Otherwise it can be either 'do' (to run 'command') or 'login' as master."); return; } } @@ -1189,8 +1189,8 @@ void VoteCommand_macro_help(entity caller, int argc) VOTE_COMMANDS(0, caller, 0, ""); #undef VOTE_COMMAND - print_to(caller, strcat("\nUsage:^3 ", command_origin, " vote COMMAND...^7, where possible commands are listed above.\n")); - print_to(caller, strcat("For help about a specific command, type ", command_origin, " vote help COMMAND")); + print_to(caller, strcat("\nUsage:^3 ", command_origin, " vote ^7, where possible commands are listed above.\n")); + print_to(caller, strcat("For help about a specific command, type ", command_origin, " vote help ")); print_to(caller, strcat("\n^7You can call a vote for or execute these commands: ^3", autocvar_sv_vote_commands, "^7 and maybe further ^3arguments^7")); } else // usage for individual command -- 2.39.2