From 53f1909966e8433d506538bf38faed6054bc919a Mon Sep 17 00:00:00 2001 From: Greyscale Date: Mon, 30 Mar 2009 22:40:12 +0200 Subject: [PATCH] Added more increase/decrease options in knockback(mult) admin menu --- .../translations/zombiereloaded.phrases.txt | 12 +++-- src/zr/zadmin.inc | 54 ++++++++++++++----- 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt index 3bd8206..4674b0a 100644 --- a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt +++ b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt @@ -391,12 +391,14 @@ "!zadmin knockbackm increase" { - "en" "Increase Knockback Multiplier" + "#format" "{1:s}" + "en" "Increase Knockback Multiplier (+{1})" } "!zadmin knockbackm decrease" { - "en" "Decrease Knockback Multiplier" + "#format" "{1:s}" + "en" "Decrease Knockback Multiplier (-{1})" } "!zadmin knockback title" @@ -407,12 +409,14 @@ "!zadmin knockback increase" { - "en" "Increase Knockback" + "#format" "{1:s}" + "en" "Increase Knockback (+{1})" } "!zadmin knockback decrease" { - "en" "Decrease Knockback" + "#format" "{1:s}" + "en" "Decrease Knockback (-{1})" } "!zadmin nvgs title" diff --git a/src/zr/zadmin.inc b/src/zr/zadmin.inc index dce330f..cb5f8f7 100644 --- a/src/zr/zadmin.inc +++ b/src/zr/zadmin.inc @@ -128,14 +128,20 @@ ZRKnockbackMMenu(client) SetMenuTitle(menu_knockbackm, "%t\n ", "!zadmin knockbackm title", curknockback); - decl String:knockbackmincrease[64]; - decl String:knockbackmdecrease[64]; + decl String:knockbackmincrease1[64]; + decl String:knockbackmdecrease1[64]; + decl String:knockbackmincrease2[64]; + decl String:knockbackmdecrease2[64]; - Format(knockbackmincrease, sizeof(knockbackmincrease), "%t", "!zadmin knockbackm increase"); - Format(knockbackmdecrease, sizeof(knockbackmdecrease), "%t", "!zadmin knockbackm decrease"); + Format(knockbackmincrease1, sizeof(knockbackmincrease1), "%t", "!zadmin knockbackm increase", "0.1"); + Format(knockbackmdecrease1, sizeof(knockbackmdecrease1), "%t", "!zadmin knockbackm decrease", "0.1"); + Format(knockbackmincrease2, sizeof(knockbackmincrease2), "%t", "!zadmin knockbackm increase", "0.5"); + Format(knockbackmdecrease2, sizeof(knockbackmdecrease2), "%t", "!zadmin knockbackm decrease", "0.5"); - AddMenuItem(menu_knockbackm, "knockbackmincrease", knockbackmincrease); - AddMenuItem(menu_knockbackm, "knockbackmdecrease", knockbackmdecrease); + AddMenuItem(menu_knockbackm, "knockbackmincrease1", knockbackmincrease1); + AddMenuItem(menu_knockbackm, "knockbackmdecrease1", knockbackmdecrease1); + AddMenuItem(menu_knockbackm, "knockbackmincrease2", knockbackmincrease2); + AddMenuItem(menu_knockbackm, "knockbackmdecrease2", knockbackmdecrease2); SetMenuExitBackButton(menu_knockbackm, true); @@ -158,6 +164,16 @@ public ZRKnockbackMHandle(Handle:menu_knockbackm, MenuAction:action, client, slo AddToKnockbackMultiplier(-0.1); ZRKnockbackMMenu(client); } + case 2: + { + AddToKnockbackMultiplier(0.5); + ZRKnockbackMMenu(client); + } + case 3: + { + AddToKnockbackMultiplier(-0.5); + ZRKnockbackMMenu(client); + } } } if (action == MenuAction_Cancel) @@ -224,14 +240,20 @@ ZRClassKnockbackMenu(client, classindex) SetMenuTitle(menu_knockback, "%t\n ", "!zadmin knockback title", classname, curknockback); - decl String:knockbackincrease[64]; - decl String:knockbackdecrease[64]; + decl String:knockbackincrease1[64]; + decl String:knockbackdecrease1[64]; + decl String:knockbackincrease2[64]; + decl String:knockbackdecrease2[64]; - Format(knockbackincrease, sizeof(knockbackincrease), "%t", "!zadmin knockback increase"); - Format(knockbackdecrease, sizeof(knockbackdecrease), "%t", "!zadmin knockback decrease"); + Format(knockbackincrease1, sizeof(knockbackincrease1), "%t", "!zadmin knockback increase", "0.1"); + Format(knockbackdecrease1, sizeof(knockbackdecrease1), "%t", "!zadmin knockback decrease", "0.1"); + Format(knockbackincrease2, sizeof(knockbackincrease2), "%t", "!zadmin knockback increase", "0.5"); + Format(knockbackdecrease2, sizeof(knockbackdecrease2), "%t", "!zadmin knockback decrease", "0.5"); - AddMenuItem(menu_knockback, "knockbackincrease", knockbackincrease); - AddMenuItem(menu_knockback, "knockbackdecrease", knockbackdecrease); + AddMenuItem(menu_knockback, "knockbackincrease1", knockbackincrease1); + AddMenuItem(menu_knockback, "knockbackdecrease1", knockbackdecrease1); + AddMenuItem(menu_knockback, "knockbackincrease2", knockbackincrease2); + AddMenuItem(menu_knockback, "knockbackdecrease2", knockbackdecrease2); SetMenuExitBackButton(menu_knockback, true); @@ -252,6 +274,14 @@ public ZRClassKnockbackHandle(Handle:menu_knockback, MenuAction:action, client, { AddToClassKnockback(curMenuClass[client], -0.1); } + case 2: + { + AddToClassKnockback(curMenuClass[client], 0.5); + } + case 3: + { + AddToClassKnockback(curMenuClass[client], -0.5); + } } ZRClassKnockbackMenu(client, curMenuClass[client]);