ZombieManager: tiny fixes
This commit is contained in:
parent
d8f1848c21
commit
e354874fb8
@ -34,7 +34,7 @@ public Plugin myinfo =
|
||||
name = "Zombie Manager",
|
||||
author = "Dogan",
|
||||
description = "Tools to manage testround and zombies",
|
||||
version = "3.1.0",
|
||||
version = "3.2.0",
|
||||
url = ""
|
||||
};
|
||||
|
||||
@ -70,7 +70,7 @@ public void OnPluginStart()
|
||||
RegConsoleCmd("sm_zombiespawnsound", OnToggleZombieSpawnSound, "Toggle blocking the Sound when Mother Zombies spawn");
|
||||
RegConsoleCmd("sm_zss", OnToggleZombieSpawnSound, "Toggle blocking the Sound when Mother Zombies spawn");
|
||||
g_hZombieSpawnSound = RegClientCookie("zss_blocked", "is mother zombie spawn sound blocked", CookieAccess_Protected);
|
||||
SetCookieMenuItem(MenuHandler_CookieMenu, 0, "Mother Zombie Spawn Sound");
|
||||
SetCookieMenuItem(MenuHandler_CookieMenu, 0, "MotherZombieSpawnSound");
|
||||
|
||||
AutoExecConfig(true, "plugin.ZombieManager");
|
||||
|
||||
@ -151,7 +151,7 @@ public void ToggleZombieSpawnSound(int client)
|
||||
g_bZombieSpawnSound[client] = !g_bZombieSpawnSound[client];
|
||||
|
||||
SetClientCookie(client, g_hZombieSpawnSound, g_bZombieSpawnSound[client] ? "1" : "");
|
||||
CPrintToChat(client, "{cyan}[MotherZombieSpawnSound] {white}%s", g_bZombieSpawnSound[client] ? "Mother Zombie Spawn Sound disabled." : "Mother Zombie Spawn Sound enabled.");
|
||||
CPrintToChat(client, "{cyan}[MotherZombieSpawnSound] {white}%s", g_bZombieSpawnSound[client] ? "Sound disabled." : "Sound enabled.");
|
||||
}
|
||||
|
||||
public void OnClientCookiesCached(int client)
|
||||
@ -238,11 +238,11 @@ public void ShowSettingsMenu(int client)
|
||||
{
|
||||
Menu menu = new Menu(MenuHandler_MainMenu);
|
||||
|
||||
menu.SetTitle("Mother Zombie Spawn Sound Settings", client);
|
||||
menu.SetTitle("MotherZombieSpawnSound Settings", client);
|
||||
|
||||
char sBuffer[128];
|
||||
|
||||
Format(sBuffer, sizeof(sBuffer), "Mother Zombie Spawn Sound: %s", g_bZombieSpawnSound[client] ? "Disabled" : "Enabled");
|
||||
Format(sBuffer, sizeof(sBuffer), "Sound: %s", g_bZombieSpawnSound[client] ? "Disabled" : "Enabled");
|
||||
menu.AddItem("0", sBuffer);
|
||||
|
||||
menu.ExitBackButton = true;
|
||||
@ -256,7 +256,7 @@ public void MenuHandler_CookieMenu(int client, CookieMenuAction action, any info
|
||||
{
|
||||
case(CookieMenuAction_DisplayOption):
|
||||
{
|
||||
Format(buffer, maxlen, "Mother Zombie Spawn Sound", client);
|
||||
Format(buffer, maxlen, "MotherZombieSpawnSound", client);
|
||||
}
|
||||
case(CookieMenuAction_SelectOption):
|
||||
{
|
||||
@ -417,7 +417,7 @@ public Action OnPlayerHurt(Event event, const char[] name, bool dontBroadcast)
|
||||
|
||||
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
|
||||
{
|
||||
if(!g_bZombieDrown)
|
||||
if(!g_bZombieDrown || !IsPlayerAlive(victim))
|
||||
return Plugin_Continue;
|
||||
|
||||
if(!ZR_IsClientZombie(victim) || damagetype != DMG_DROWN)//Zombie taking damage from drowning
|
||||
|
Loading…
Reference in New Issue
Block a user