Added a shortcut to zmarket loadout in ZCookies, added joinclass to suicide intercept as default.
This commit is contained in:
parent
637c04aa21
commit
37fe9fae8b
@ -984,6 +984,11 @@
|
|||||||
"en" "Human/Zombie Class Overlay: {1}"
|
"en" "Human/Zombie Class Overlay: {1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"ZCookies zmarket loadout"
|
||||||
|
{
|
||||||
|
"en" "ZMarket Loadout"
|
||||||
|
}
|
||||||
|
|
||||||
// ===========================
|
// ===========================
|
||||||
// ZSpawn (module)
|
// ZSpawn (module)
|
||||||
// ===========================
|
// ===========================
|
||||||
|
@ -336,8 +336,8 @@ zr_damage_suicide_mzombie "1"
|
|||||||
zr_damage_suicide_human "0"
|
zr_damage_suicide_human "0"
|
||||||
|
|
||||||
// List of client commands to intercept as suicide attempts. [Delimiter: ", "]
|
// List of client commands to intercept as suicide attempts. [Delimiter: ", "]
|
||||||
// Default: "kill, spectate, jointeam"
|
// Default: "kill, spectate, jointeam, joinclass"
|
||||||
zr_damage_suicide_cmds "kill, spectate, jointeam"
|
zr_damage_suicide_cmds "kill, spectate, jointeam, joinclass"
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -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.");
|
g_hCvarsList[CVAR_DAMAGE_BLOCK_BLAST] = CreateConVar("zr_damage_block_blast", "1", "Block blast damage inflicted on self or teammates.");
|
||||||
|
|
||||||
// Suicide Intercept
|
// 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_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_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_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_CMDS] = CreateConVar("zr_damage_suicide_cmds", "kill, spectate, jointeam, joinclass", "List of client commands to intercept as suicide attempts. [Delimiter: \", \"]");
|
||||||
|
|
||||||
|
|
||||||
// ===========================
|
// ===========================
|
||||||
|
@ -62,22 +62,26 @@ ZCookiesMenuMain(client)
|
|||||||
decl String:autorebuy[64];
|
decl String:autorebuy[64];
|
||||||
decl String:zhp[64];
|
decl String:zhp[64];
|
||||||
decl String:overlay[64];
|
decl String:overlay[64];
|
||||||
|
decl String:zmarket[64];
|
||||||
|
|
||||||
// Translate each line into client's language.
|
// Translate each line into client's language.
|
||||||
Format(autorebuy, sizeof(autorebuy), "%t", "ZCookies menu main auto-rebuy", autorebuyenabled);
|
Format(autorebuy, sizeof(autorebuy), "%t", "ZCookies menu main auto-rebuy", autorebuyenabled);
|
||||||
Format(zhp, sizeof(zhp), "%t", "ZCookies menu main zhp", zhpenabled);
|
Format(zhp, sizeof(zhp), "%t", "ZCookies menu main zhp", zhpenabled);
|
||||||
Format(overlay, sizeof(overlay), "%t", "ZCookies menu main overlay", overlayenabled);
|
Format(overlay, sizeof(overlay), "%t", "ZCookies menu main overlay", overlayenabled);
|
||||||
|
Format(zmarket, sizeof(zmarket), "%t", "ZCookies zmarket loadout");
|
||||||
|
|
||||||
// Get conditional values for each option.
|
// Get conditional values for each option.
|
||||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]); // For auto-rebuy.
|
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: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: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.
|
// Add items to menu.
|
||||||
AddMenuItem(zcookies_menu_main, "autorebuy", autorebuy, MenuGetItemDraw(weapons && zmarketrebuyauto));
|
AddMenuItem(zcookies_menu_main, "autorebuy", autorebuy, MenuGetItemDraw(weapons && zmarketrebuyauto));
|
||||||
AddMenuItem(zcookies_menu_main, "zhp", zhp, MenuGetItemDraw(zhpcvar));
|
AddMenuItem(zcookies_menu_main, "zhp", zhp, MenuGetItemDraw(zhpcvar));
|
||||||
AddMenuItem(zcookies_menu_main, "overlay", overlay, MenuGetItemDraw(overlaytoggle));
|
AddMenuItem(zcookies_menu_main, "overlay", overlay, MenuGetItemDraw(overlaytoggle));
|
||||||
|
AddMenuItem(zcookies_menu_main, "zmarket", zmarket, MenuGetItemDraw(zmarketenabled));
|
||||||
|
|
||||||
// Create a "Back" button to the main menu.
|
// Create a "Back" button to the main menu.
|
||||||
SetMenuExitBackButton(zcookies_menu_main, true);
|
SetMenuExitBackButton(zcookies_menu_main, true);
|
||||||
@ -100,6 +104,8 @@ public ZCookiesMenuMainHandle(Handle:menu, MenuAction:action, client, slot)
|
|||||||
// Client selected an option.
|
// Client selected an option.
|
||||||
if (action == MenuAction_Select)
|
if (action == MenuAction_Select)
|
||||||
{
|
{
|
||||||
|
new bool:resend = true;
|
||||||
|
|
||||||
switch(slot)
|
switch(slot)
|
||||||
{
|
{
|
||||||
// Toggled auto-rebuy
|
// Toggled auto-rebuy
|
||||||
@ -125,10 +131,22 @@ public ZCookiesMenuMainHandle(Handle:menu, MenuAction:action, client, slot)
|
|||||||
CookiesSetClientCookieBool(client, g_hOverlayEnabledCookie, overlayenabled);
|
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.
|
if (resend)
|
||||||
ZCookiesMenuMain(client);
|
{
|
||||||
|
// Re-send menu.
|
||||||
|
ZCookiesMenuMain(client);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Client closed the menu.
|
// Client closed the menu.
|
||||||
if (action == MenuAction_Cancel)
|
if (action == MenuAction_Cancel)
|
||||||
|
Loading…
Reference in New Issue
Block a user