Permalink
Browse files

Add option to reopen rules menu while motd/popup window

  • Loading branch information...
Bara committed May 10, 2018
1 parent ad72454 commit 85cdb5e9a9266d1a454371f4715cba43a252652e
@@ -131,6 +131,7 @@ void SetupConfig()
g_cLogButtons = AutoExecConfig_CreateConVar("ttt_log_pressed_buttons", "0", "Log pressed buttons?", _, true, 0.0, true, 1.0);
g_cLogButtonsSpam = AutoExecConfig_CreateConVar("ttt_log_pressed_buttons", "5", "Prevent log spamming for the same button - Time in seconds to relog a button");
g_cOpenRulesOnPunish = AutoExecConfig_CreateConVar("ttt_open_rules_on_punish", "0", "Open rules menu for a player while he will be punished?", _, true, 0.0, true, 1.0);
g_cRulesURLCloseMenu = AutoExecConfig_CreateConVar("ttt_close_rules_on_url", "1", "Close Menu when a player will be redirect to motd/popup window?", _, true, 0.0, true, 1.0);
g_cpluginTag.AddChangeHook(OnConVarChanged);
g_ckickImmunity.AddChangeHook(OnConVarChanged);
@@ -283,6 +283,7 @@ ConVar g_cSilentIdRoles = null;
ConVar g_cLogButtons = null;
ConVar g_cLogButtonsSpam = null;
ConVar g_cOpenRulesOnPunish = null;
ConVar g_cRulesURLCloseMenu = null;
Handle g_hRules = null;
bool g_bRules[MAXPLAYERS + 1] = { false, ... };
@@ -2261,8 +2261,15 @@ public int Menu_ShowWelcomeMenu(Menu menu, MenuAction action, int client, int pa
{
WebFix_OpenUrl(client, "TTT Rules", sValue);
g_bKnowRules[client] = false;
g_bReadRules[client] = true;
if (g_cRulesURLCloseMenu.BoolValue)
{
g_bKnowRules[client] = false;
g_bReadRules[client] = true;
}
else
{
TTT_ClientOpenRules(client);
}
delete kvRules;
return 0;

0 comments on commit 85cdb5e

Please sign in to comment.