From 47f693fbf592fda9408b1a905d146ccb158ef315 Mon Sep 17 00:00:00 2001 From: Rushaway Date: Wed, 10 Apr 2024 16:15:14 +0200 Subject: [PATCH] feat: Update to DZ 56 - Fix: HUD/KeyHint inversed - Fix: Incorrect spelling of "Has Restrcit" translate - Fix: Buffer size when escaping --- addons/sourcemod/scripting/entwatch/module_eban.inc | 4 ++-- addons/sourcemod/scripting/entwatch/module_hud.inc | 6 +++--- addons/sourcemod/scripting/entwatch_dz.sp | 2 +- addons/sourcemod/translations/EntWatch_DZ.phrases.txt | 2 +- addons/sourcemod/translations/fr/EntWatch_DZ.phrases.txt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/sourcemod/scripting/entwatch/module_eban.inc b/addons/sourcemod/scripting/entwatch/module_eban.inc index d60e395..034b1df 100755 --- a/addons/sourcemod/scripting/entwatch/module_eban.inc +++ b/addons/sourcemod/scripting/entwatch/module_eban.inc @@ -327,7 +327,7 @@ public void EWM_Eban_BanClient(int iClient, int iAdmin, int iDuration, char[] sR // Save to DB if (g_iDBStatus == 4 && iBanDuration >= 0) { - char szAdmin_Name[32], sClient_Name[32], szClient_Name[32], szReason[64]; + char szAdmin_Name[32 * 2 + 1], sClient_Name[32 * 2 + 1], szClient_Name[32 * 2 + 1], szReason[64 * 2 + 1]; g_hEbanDB.Escape(sAdmin_Name, szAdmin_Name, sizeof(szAdmin_Name)); // Admin Name to DB GetClientName(iClient, sClient_Name, sizeof(sClient_Name)); // Get Client Name g_hEbanDB.Escape(sClient_Name, szClient_Name, sizeof(szClient_Name)); // Client Name to DB @@ -445,7 +445,7 @@ public void EWM_Eban_UnBanClient(int iClient, int iAdmin, char[] sReason) if(g_iDBStatus == 4) { - char sSQL_Query[1024], szReason[64], szAdmin_Name[32]; + char sSQL_Query[1024], szReason[64 * 2 + 1], szAdmin_Name[32 * 2 + 1]; g_hEbanDB.Escape(sReason, szReason, sizeof(szReason));//Reason Unban to DB g_hEbanDB.Escape(sAdmin_Name, szAdmin_Name, sizeof(szAdmin_Name));//Admin Name Unban to DB diff --git a/addons/sourcemod/scripting/entwatch/module_hud.inc b/addons/sourcemod/scripting/entwatch/module_hud.inc index 21d22e6..47771c2 100755 --- a/addons/sourcemod/scripting/entwatch/module_hud.inc +++ b/addons/sourcemod/scripting/entwatch/module_hud.inc @@ -653,7 +653,7 @@ public Action EWM_Hud_Command_ToggleHUDType(int iClient, int iArgs) { g_CSettings_Hud[iClient].Type = !g_CSettings_Hud[iClient].Type; SetClientCookie(iClient, g_hCookie_HudType, g_CSettings_Hud[iClient].Type ? "1" : "0"); - CPrintToChat(iClient, "%s%t %s%t %s%t", g_SchemeConfig.Color_Tag, "EW_Tag", g_SchemeConfig.Color_Warning, "Hud Type", g_SchemeConfig.Color_Enabled, g_CSettings_Hud[iClient].Type ? "HUD" : "KeyHintText"); + CPrintToChat(iClient, "%s%t %s%t %s%t", g_SchemeConfig.Color_Tag, "EW_Tag", g_SchemeConfig.Color_Warning, "Hud Type", g_SchemeConfig.Color_Enabled, g_CSettings_Hud[iClient].Type ?"KeyHintText" : "HUD"); } return Plugin_Handled; } @@ -893,9 +893,9 @@ public int CookieMenuHandler(Menu menu, MenuAction action, int param1, int param { char Type[32]; if (g_CSettings_Hud[param1].Type) - FormatEx(Type, sizeof(Type), "%T", "HUD", param1); - else FormatEx(Type, sizeof(Type), "%T", "KeyHintText", param1); + else + FormatEx(Type, sizeof(Type), "%T", "HUD", param1); FormatEx(display, sizeof(display), "%T: %s", "Hud Type", param1, Type); return RedrawMenuItem(display); diff --git a/addons/sourcemod/scripting/entwatch_dz.sp b/addons/sourcemod/scripting/entwatch_dz.sp index 263dfcf..5379962 100644 --- a/addons/sourcemod/scripting/entwatch_dz.sp +++ b/addons/sourcemod/scripting/entwatch_dz.sp @@ -87,7 +87,7 @@ public Plugin myinfo = name = "EntWatch", author = "DarkerZ[RUS], AgentWesker, notkoen, sTc2201, maxime1907, Cmer, .Rushaway, Dolly", description = "Notify players about entity interactions.", - version = "3.DZ.55", + version = "3.DZ.56", url = "dark-skill.ru" }; diff --git a/addons/sourcemod/translations/EntWatch_DZ.phrases.txt b/addons/sourcemod/translations/EntWatch_DZ.phrases.txt index ddb8021..1ee3442 100644 --- a/addons/sourcemod/translations/EntWatch_DZ.phrases.txt +++ b/addons/sourcemod/translations/EntWatch_DZ.phrases.txt @@ -171,7 +171,7 @@ } "Has a Restrict" { - "en" "has a restrict" + "en" "is currently restricted" } "Transfered all items" { diff --git a/addons/sourcemod/translations/fr/EntWatch_DZ.phrases.txt b/addons/sourcemod/translations/fr/EntWatch_DZ.phrases.txt index ef14a35..bc097f2 100644 --- a/addons/sourcemod/translations/fr/EntWatch_DZ.phrases.txt +++ b/addons/sourcemod/translations/fr/EntWatch_DZ.phrases.txt @@ -167,7 +167,7 @@ } "Has a Restrict" { - "fr" "a un restrict" + "fr" "est actuellement restreint" } "Transfered all items" {