Skip to content

Commit eb57991

Browse files
authored
EditGag menu fixes (#257)
* fix(gag): 🐛 Gag menu don't react to switch Voice flag Doesn't account for behavior `ca_gag_common_chat_block` is 1, swtich case in handler close #254 issue * fix(gag): 🐛 GagEdit: Fix EXIT item shift `ca_gag_common_chat_block 1` depends close #256 issue
1 parent bae230a commit eb57991

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cstrike/addons/amxmodx/scripting/CA_Gag.sma

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,9 @@ static MenuShow_EditGag(const id) {
956956
menu_addblank2(menu)
957957
menu_addblank2(menu)
958958

959+
if(ca_gag_common_chat_block)
960+
menu_addblank2(menu)
961+
959962
menu_additem(menu, fmt("%L", id, "Gag_MenuItem_Confirm"), fmt("%i", ITEM_CONFIRM), .callback = callback)
960963

961964
menu_setprop(menu, MPROP_PERPAGE, 0)
@@ -1014,8 +1017,8 @@ public MenuHandler_EditGag(const id, const menu, const item) {
10141017

10151018
switch(item) {
10161019
case item_Say: g_adminTempData[id][gd_reason][r_flags] ^= gagFlag_Say
1017-
case item_SayTeam: g_adminTempData[id][gd_reason][r_flags] ^= gagFlag_SayTeam
1018-
case item_Voice: g_adminTempData[id][gd_reason][r_flags] ^= gagFlag_Voice
1020+
case item_SayTeam: g_adminTempData[id][gd_reason][r_flags] ^= (ca_gag_common_chat_block ? gagFlag_Voice : gagFlag_SayTeam)
1021+
case item_Voice: g_adminTempData[id][gd_reason][r_flags] ^= gagFlag_Voice // not used when `ca_gag_common_chat_block` is 1
10191022
case item_Reason: {
10201023
MenuShow_SelectReason(id)
10211024

0 commit comments

Comments
 (0)