diff --git a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt index 0313d53..6b34eca 100644 --- a/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt +++ b/cstrike/addons/sourcemod/translations/zombiereloaded.phrases.txt @@ -984,6 +984,11 @@ "en" "Human/Zombie Class Overlay: {1}" } + "ZCookies zmarket loadout" + { + "en" "ZMarket Loadout" + } + // =========================== // ZSpawn (module) // =========================== diff --git a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg index eb9bbe9..aed94fb 100644 --- a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg +++ b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg @@ -336,8 +336,8 @@ zr_damage_suicide_mzombie "1" zr_damage_suicide_human "0" // List of client commands to intercept as suicide attempts. [Delimiter: ", "] -// Default: "kill, spectate, jointeam" -zr_damage_suicide_cmds "kill, spectate, jointeam" +// Default: "kill, spectate, jointeam, joinclass" +zr_damage_suicide_cmds "kill, spectate, jointeam, joinclass" // ---------------------------------------------------------------------------- diff --git a/src/zr/cvars.inc b/src/zr/cvars.inc index 0b213ab..1191623 100644 --- a/src/zr/cvars.inc +++ b/src/zr/cvars.inc @@ -310,10 +310,10 @@ CvarsCreate() g_hCvarsList[CVAR_DAMAGE_BLOCK_BLAST] = CreateConVar("zr_damage_block_blast", "1", "Block blast damage inflicted on self or teammates."); // Suicide Intercept - g_hCvarsList[CVAR_DAMAGE_SUICIDE_ZOMBIE] = CreateConVar("zr_damage_suicide_zombie", "0", "Intercept suicide commands attempted by zombies."); - g_hCvarsList[CVAR_DAMAGE_SUICIDE_MZOMBIE] = CreateConVar("zr_damage_suicide_mzombie", "1", "Intercept suicide commands attempted by mother zombies."); - g_hCvarsList[CVAR_DAMAGE_SUICIDE_HUMAN] = CreateConVar("zr_damage_suicide_human", "0", "Intercept suicide commands attempted by humans."); - g_hCvarsList[CVAR_DAMAGE_SUICIDE_CMDS] = CreateConVar("zr_damage_suicide_cmds", "kill, spectate, jointeam", "List of client commands to intercept as suicide attempts. [Delimiter: \", \"]"); + g_hCvarsList[CVAR_DAMAGE_SUICIDE_ZOMBIE] = CreateConVar("zr_damage_suicide_zombie", "0", "Intercept suicide commands attempted by zombies."); + g_hCvarsList[CVAR_DAMAGE_SUICIDE_MZOMBIE] = CreateConVar("zr_damage_suicide_mzombie", "1", "Intercept suicide commands attempted by mother zombies."); + g_hCvarsList[CVAR_DAMAGE_SUICIDE_HUMAN] = CreateConVar("zr_damage_suicide_human", "0", "Intercept suicide commands attempted by humans."); + g_hCvarsList[CVAR_DAMAGE_SUICIDE_CMDS] = CreateConVar("zr_damage_suicide_cmds", "kill, spectate, jointeam, joinclass", "List of client commands to intercept as suicide attempts. [Delimiter: \", \"]"); // =========================== diff --git a/src/zr/zcookies.inc b/src/zr/zcookies.inc index 930ad28..78d3e55 100644 --- a/src/zr/zcookies.inc +++ b/src/zr/zcookies.inc @@ -62,22 +62,26 @@ ZCookiesMenuMain(client) decl String:autorebuy[64]; decl String:zhp[64]; decl String:overlay[64]; + decl String:zmarket[64]; // Translate each line into client's language. Format(autorebuy, sizeof(autorebuy), "%t", "ZCookies menu main auto-rebuy", autorebuyenabled); Format(zhp, sizeof(zhp), "%t", "ZCookies menu main zhp", zhpenabled); Format(overlay, sizeof(overlay), "%t", "ZCookies menu main overlay", overlayenabled); + Format(zmarket, sizeof(zmarket), "%t", "ZCookies zmarket loadout"); // Get conditional values for each option. new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]); // For auto-rebuy. new bool:zmarketrebuyauto = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_REBUY_AUTO]); // For auto-rebuy. - new bool:zhpcvar = GetConVarBool(g_hCvarsList[CVAR_ZHP]); // For ZHP. + new bool:zhpcvar = GetConVarBool(g_hCvarsList[CVAR_ZHP]); // For ZHP. new bool:overlaytoggle = GetConVarBool(g_hCvarsList[CVAR_CLASSES_OVERLAY_TOGGLE]); // For class overlay. + new bool:zmarketenabled = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET]); // For ZMarket loadout. // Add items to menu. AddMenuItem(zcookies_menu_main, "autorebuy", autorebuy, MenuGetItemDraw(weapons && zmarketrebuyauto)); AddMenuItem(zcookies_menu_main, "zhp", zhp, MenuGetItemDraw(zhpcvar)); AddMenuItem(zcookies_menu_main, "overlay", overlay, MenuGetItemDraw(overlaytoggle)); + AddMenuItem(zcookies_menu_main, "zmarket", zmarket, MenuGetItemDraw(zmarketenabled)); // Create a "Back" button to the main menu. SetMenuExitBackButton(zcookies_menu_main, true); @@ -100,6 +104,8 @@ public ZCookiesMenuMainHandle(Handle:menu, MenuAction:action, client, slot) // Client selected an option. if (action == MenuAction_Select) { + new bool:resend = true; + switch(slot) { // Toggled auto-rebuy @@ -125,10 +131,22 @@ public ZCookiesMenuMainHandle(Handle:menu, MenuAction:action, client, slot) CookiesSetClientCookieBool(client, g_hOverlayEnabledCookie, overlayenabled); } } + // Opened ZMarket loadout. + case 3: + { + // Show a client their current loadout. + ZMarketMenuLoadout(client); + + // Don't resend ZCookies. + resend = false; + } } - // Re-send menu. - ZCookiesMenuMain(client); + if (resend) + { + // Re-send menu. + ZCookiesMenuMain(client); + } } // Client closed the menu. if (action == MenuAction_Cancel)