Permalink
Browse files

Add convar for showing innocent rdm menu

@superblack4 you should enable this ( #315 )
  • Loading branch information...
Bara committed Jun 10, 2018
1 parent e0451c8 commit bb6313770a786c90e9150438cb27a8b894715b0e
@@ -135,6 +135,7 @@ void SetupConfig()
g_cNameChangePunish = AutoExecConfig_CreateConVar("ttt_name_change_punishment", "0", "Which punishment while name change? 0 - Disabled, 1 - Message to all players, 2 - Block Name Change, 3 - Kick Player or 4 - Ban player", _, true, 0.0, true, 3.0);
g_cNameChangeLength = AutoExecConfig_CreateConVar("ttt_name_change_banlength", "120", "Ban length for name change (require 'ttt_name_change_punishment 3')");
g_cIdentifyLog = AutoExecConfig_CreateConVar("ttt_identity_log", "0", "Log every identified body?", _, true, 0.0, true, 1.0);
g_cShowInnoRDMMenu = AutoExecConfig_CreateConVar("ttt_show_rdm_menu_for_inno", "0", "Show RDM Menu while killing Innocent as Innocent?", _, true, 0.0, true, 1.0);
g_cpluginTag.AddChangeHook(OnConVarChanged);
g_ckickImmunity.AddChangeHook(OnConVarChanged);
@@ -286,6 +286,7 @@ ConVar g_cRulesURLReopenMenu = null;
ConVar g_cNameChangePunish = null;
ConVar g_cNameChangeLength = null;
ConVar g_cIdentifyLog = null;
ConVar g_cShowInnoRDMMenu = null;
Handle g_hRules = null;
bool g_bRules[MAXPLAYERS + 1] = { false, ... };
@@ -1951,7 +1951,11 @@ public Action Event_PlayerDeathPre(Event event, const char[] menu, bool dontBroa
if (client != iAttacker && iAttacker != 0 && !g_bImmuneRDMManager[iAttacker])
{
if ((g_iRole[iAttacker] == TTT_TEAM_TRAITOR && g_iRole[client] == TTT_TEAM_TRAITOR) || (g_iRole[iAttacker] != TTT_TEAM_TRAITOR && g_iRole[client] != TTT_TEAM_TRAITOR))
if (
(g_iRole[iAttacker] == TTT_TEAM_TRAITOR && g_iRole[client] == TTT_TEAM_TRAITOR) ||
(g_iRole[iAttacker] == TTT_TEAM_DETECTIVE && g_iRole[client] == TTT_TEAM_DETECTIVE) ||
(g_cShowInnoRDMMenu.BoolValue && g_iRole[iAttacker] == TTT_TEAM_INNOCENT && g_iRole[client] == TTT_TEAM_INNOCENT)
)
{
if (g_hRDMTimer[client] != null)
{

0 comments on commit bb63137

Please sign in to comment.