diff --git a/addons/sourcemod/scripting/surftimer/convars.sp b/addons/sourcemod/scripting/surftimer/convars.sp index f70af66..c1ac191 100644 --- a/addons/sourcemod/scripting/surftimer/convars.sp +++ b/addons/sourcemod/scripting/surftimer/convars.sp @@ -114,6 +114,7 @@ ConVar g_hSlayOnRoundEnd = null; ConVar g_hLimitSpeedType = null; ConVar g_dcCalladminName = null; ConVar g_dcBugTrackerName = null; +ConVar g_drDeleteSecurity = null; void CreateConVars() { @@ -161,6 +162,7 @@ void CreateConVars() g_hTeleToStartWhenSettingsLoaded = CreateConVar("ck_teleportclientstostart", "1", "(1 / 0) Teleport players automatically back to the start zone, when their settings have been loaded.", FCVAR_NOTIFY, true, 0.0, true, 1.0); g_dcCalladminName = CreateConVar("ck_discord_calladmin_name", "z4lab Calladmin", "Webhook name for !calladmin - Discord side", FCVAR_NOTIFY); g_dcBugTrackerName = CreateConVar("ck_discord_bug_tracker_name", "z4lab Bugtracker", "Webhook name for !bug - Discord side", FCVAR_NOTIFY); + g_drDeleteSecurity = CreateConVar("ck_dr_delete_security", "1", "(1 / 0) Disabled/Enable delete security for !dr command", FCVAR_NOTIFY, true, 0.0, true, 1.0); g_hPointSystem = CreateConVar("ck_point_system", "1", "on/off - Player point system", FCVAR_NOTIFY, true, 0.0, true, 1.0); HookConVarChange(g_hPointSystem, OnSettingChanged); diff --git a/addons/sourcemod/scripting/surftimer/sql.sp b/addons/sourcemod/scripting/surftimer/sql.sp index 0166922..807fa20 100644 --- a/addons/sourcemod/scripting/surftimer/sql.sp +++ b/addons/sourcemod/scripting/surftimer/sql.sp @@ -266,15 +266,21 @@ public int callback_DeleteRecord(Menu menu, MenuAction action, int client, int k char recordsBreak[3][32]; ExplodeString(menuItem, ";;;", recordsBreak, sizeof(recordsBreak), sizeof(recordsBreak[])); - Menu confirm = new Menu(callback_Confirm); - confirm.SetTitle("%s Records Editing Menu - Confirm Deletion\n► Deleting %s [%s] %s record\n ", g_szMenuPrefix, recordsBreak[0], recordsBreak[1], recordsBreak[2]); - - confirm.AddItem("0", "No"); - confirm.AddItem(recordsBreak[1], "Yes\n \n► This cannot be undone"); - - confirm.Display(client, MENU_TIME_FOREVER); - - return 0; + if(GetConVarBool(g_drDeleteSecurity)) { + Menu confirm = new Menu(callback_Confirm); + + confirm.SetTitle("%s Records Editing Menu - Confirm Deletion\n► Deleting %s [%s] %s record\n ", g_szMenuPrefix, recordsBreak[0], recordsBreak[1], recordsBreak[2]); + + confirm.AddItem("0", "No"); + confirm.AddItem(recordsBreak[1], "Yes\n \n► This cannot be undone"); + + confirm.Display(client, MENU_TIME_FOREVER); + + return 0; + } else { + Menu confirm = new Menu(callback_Confirm); + callback_Confirm(confirm, MenuAction_Select, client, 1); + } } else if (action == MenuAction_Cancel) {