Page 1 of 1

EXTRA ROUNDs

Posted: 14 Jan 2019, 11:37
by Rain1153
Can u create a zombie class which kills human? (GENERIC DMG crashes server idk why)
instead of infecting em
so that we can use it in a plugin
like nemesis round
controlled my admin commands.
When admin starts the round then all the zms can't choose any class but be forced to be like THE NEMESIS For example.
this is an example i can edit the code if you please make it. Thanks :)
see if a command is given by admin
it should
force the zms
in the round
to become
the killer
or has to become killer
after zm is chosen

Re: EXTRA ROUNDs

Posted: 15 Jan 2019, 07:42
by Jack GamePlay
Try:

Code: Select all

#include <zombie_escape>
#include <ze_zombie_class>

/*================= START CONFIGS =====================*/
new const KILLER_NAME[] = "Killer" // name
new const KILLER_INFO[] = "Kills human" // description
const KILLER_HEALTH = 50000 // health
const KILLER_SPEED = 350 // speed
const KILLER_GRAVITY = 650 // gravity
/*================= END CONFIGS =====================*/

new g_iClassID

public plugin_init()
{
	register_plugin("[ZE] Zombie Class: Killer", "1.0", "Jack GamePlay")
}

public plugin_precache()
{
	g_iClassID = ze_register_zombie_class(KILLER_NAME, KILLER_INFO, KILLER_HEALTH, KILLER_SPEED, KILLER_GRAVITY)	
}

public ze_user_infected_pre(id, attacker)
{
	if (!is_user_alive(id) || !is_user_alive(attacker))
		return

	if (ze_is_user_zombie(attacker) && ze_get_current_zombie_class(attacker) == g_iClassID)
	{
		ExecuteHam(Ham_Killed, id, attacker)
	}
}

Re: EXTRA ROUNDs

Posted: 15 Jan 2019, 08:34
by Jack GamePlay

Code: Select all

#include <zombie_escape>
#include <ze_zombie_class>

#define ACCESS ADMIN_BAN

/*================= START CONFIGS =====================*/
new const KILLER_NAME[] = "Killer" // name
new const KILLER_INFO[] = "Kills human" // description
const KILLER_HEALTH = 50000 // health
const KILLER_SPEED = 350 // speed
const KILLER_GRAVITY = 650 // gravity
/*================= END CONFIGS =====================*/

new g_iClassID, bool:g_bKillerRound = false

public plugin_init()
{
	register_plugin("[ZE] Zombie Class: Killer", "1.0", "Jack GamePlay")
	register_concmd("ze_start_killer", "cmd_killer", _, "Start specific game mode", 0)
}

public plugin_precache()
{
	g_iClassID = ze_register_zombie_class(KILLER_NAME, KILLER_INFO, KILLER_HEALTH, KILLER_SPEED, KILLER_GRAVITY)	
}

public ze_user_infected_pre(id, attacker)
{
	if (!is_user_alive(id) || !is_user_alive(attacker))
		return

	if (ze_is_user_zombie(attacker) && ze_get_current_zombie_class(attacker) == g_iClassID)
	{
		ExecuteHam(Ham_Killed, id, attacker)
	}

	if (g_bKillerRound)
	{
		for (new i = 0; i < get_member_game(m_nMaxPlayers); i++)
		{
			if (!is_user_alive(id))
				continue

			if (ze_get_next_zombie_class(id) != g_iClassID)
			{
				ze_set_next_zombie_class(id, g_iClassID)
			}
		}
	}
}

public cmd_killer(id, level, cid)
{
	if (!cmd_access(id, ACCESS, cid, 2))
		return PLUGIN_HANDLED
	
	if (ze_get_zombies_number() > 0)
	{
		client_print(id, print_console, "[ZE] Can't use this command after the zombie choosing")
		return PLUGIN_HANDLED
	}
	
	g_bKillerRound = true
	ze_colored_print(id, "!tKiller round has started!n.")
	return PLUGIN_HANDLED
}

public ze_roundend()
{
	g_bKillerRound = false
}/code]