seta hud_panel_itemstime_hidespawned "1" "if 1 hide an item from the panel when all the occurrences of it are available again; if 2 hide it when at least one occurrence is available again"
seta hud_panel_itemstime_hidebig "0" "if 1 hide big armor and health from the panel"
+set _hud_panel_quickmenu_file_from_server "" "reserved cvar set by the server with a custom server quickmenu file that appears in the default quickmenu"
seta hud_panel_quickmenu_file "" "load the quick menu from this file (empty or 0 to disable)"
seta hud_panel_quickmenu_translatecommands 0 "when the game is translated, translate strings inside commands too (useful for chat commands)"
seta hud_panel_quickmenu_time 5 "quickmenu expires after this number of seconds in the same page"
{
if (argv(2) == "help")
{
- LOG_HELP(" quickmenu [[default | file | \"\"] submenu file]");
+ LOG_HELP(" quickmenu [[default | file | \"\"] <submenu> <filename>]");
LOG_HELP("Called without options (or with \"\") loads either the default quickmenu or a quickmenu file if hud_panel_quickmenu_file is set to a valid filename.");
LOG_HELP("A submenu name can be given to open the quickmenu directly in a submenu; it requires to specify 'default', 'file' or '\"\"' option.");
LOG_HELP("A file name can also be given to open a different quickmenu");
QUICKMENU_ENTRY(CTX(_("QMCMD^Shuffle teams")), "vcall shuffleteams")
QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
+ if (autocvar__hud_panel_quickmenu_file_from_server != "")
+ {
+ // TODO make it translatable
+ QUICKMENU_ENTRY("Server's custom quickmenu", "quickmenu; wait; quickmenu \"\" \"\" $_hud_panel_quickmenu_file_from_server")
+ }
+
if(spectatee_status != 0)
{
QUICKMENU_SMENU_PL(CTX(_("QMCMD^Spectate a player")), "Spectate a player", "spectate \"%s^7\"", 0, 1)
float autocvar_hud_panel_quickmenu_translatecommands;
string autocvar_hud_panel_quickmenu_file;
float autocvar_hud_panel_quickmenu_time;
+string autocvar__hud_panel_quickmenu_file_from_server;
bool QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary);
bool QuickMenu_IsOpened();
{
if (g_weaponarena_weapons == WEPSET(TUBA))
stuffcmd(this, "cl_cmd settemp chase_active 1\n");
+ // quickmenu file must be put in a subfolder with an unique name
+ // to reduce chances of overriding custom client quickmenus
+ if (autocvar_sv_quickmenu_file != "" && strstrofs(autocvar_sv_quickmenu_file, "/", 0) && fexists(autocvar_sv_quickmenu_file))
+ stuffcmd(this, sprintf("cl_cmd settemp _hud_panel_quickmenu_file_from_server %s\n", autocvar_sv_quickmenu_file));
}
if (!autocvar_sv_foginterval && world.fog != "")
int autocvar_spawn_debug;
string autocvar_sv_motd;
int autocvar_sv_name_maxlength = 64;
+string autocvar_sv_quickmenu_file;
bool autocvar_sv_servermodelsonly;
+bool autocvar_sv_showspectators;
int autocvar_sv_spectate;
bool autocvar_sv_teamnagger;
float autocvar_sv_player_scale;
-bool autocvar_sv_showspectators;
// WEAPONTODO
.string weaponorder_byimpulse;
// don't notify cvar changes in the chat
sv_disablenotify 1
+
+set sv_quickmenu_file "" "filename of the quickmenu that appears in client's default quickmenu, file must be located in a subfolder with an unique name"