#if defined _ck_zp50_kernel_included

  #endinput

#endif

#define _ck_zp50_kernel_included

/**
 * Returns whether a player is a zombie.
 *
 * @param id		Player index.
 * @return			True if it is, false otherwise.
 */
#define zp_core_is_zombie(%0)	BIT_VALID(g_iBit_Zombie, %0)

new stock g_iBit_Zombie;

public zp_fw_class_zombie_bit_change(iBit_Sum)
{
	g_iBit_Zombie = iBit_Sum;
}

/**
 * Returns whether a player is the first zombie.
 *
 * @param id		Player index.
 * @return			True if it is, false otherwise.
 */
native zp_core_is_first_zombie(id)

/**
 * Returns whether a player is the last zombie.
 *
 * @param id		Player index.
 * @return			True if it is, false otherwise.
 */
native zp_core_is_last_zombie(id)

/**
 * Returns whether a player is the last human.
 *
 * @param id		Player index.
 * @return			True if it is, false otherwise.
 */
native zp_core_is_last_human(id)

/**
 * Returns number of alive zombies.
 *
 * @return		Zombie count.
 */
native zp_core_get_zombie_count()

/**
 * Returns number of alive humans.
 *
 * @return		Human count.
 */
native zp_core_get_human_count()

/**
 * Turns a player into a zombie.
 *
 * @param id		Player index to be infected.
 * @param attacker	Player who triggered the infection. (optional)
 * @return			True on success, false otherwise.
 */
native zp_core_infect(id, attacker = 0)

/**
 * Turns a player into a human.
 *
 * @param id		Player index to be cured.
 * @param attacker	Player who triggered the cure. (optional)
 * @return			True on success, false otherwise.
 */
native zp_core_cure(id, attacker = 0)

/**
 * Forces a player to become a zombie/human.
 *
 * Note: use this only when previous checks need to be skipped.
 *
 * @param id		Player index to be infected/cured.
 * @return			True on success, false otherwise.
 */
native zp_core_force_infect(id)
native zp_core_force_cure(id)

/**
 * Sets whether the player will be respawned as zombie or human.
 *
 * @param id			Player index.
 * @param zombie		True to respawn as zombie, false otherwise.
 */
native zp_core_respawn_as_zombie(id, zombie = true)

/**
 * Called when a player gets infected.
 *
 * @param id		Player index who was infected.
 * @param attacker	Player who triggered the infection.
 *					(0 if not available, id = attacker if he infected himself)
 */
forward zp_fw_core_infect(id, attacker)
forward zp_fw_core_infect_post(id, attacker)

/**
 * Called when a player turns back to human.
 *
 * @param id		Player index who was cured.
 * @param attacker	Player who triggered the cure.
 *					(0 if not available, id = attacker if he cured himself)
 */
forward zp_fw_core_cure(id, attacker)
forward zp_fw_core_cure_post(id, attacker)

/**
 * Called on a player infect/cure attempt. You can block it by
 * returning PLUGIN_HANDLED in your plugin.
 *
 * @param id		Player index who is being infected/cured.
 * @param attacker	Player who is triggering the infection/cure.
 *					(0 if not available, id = attacker if he is infecting/curing himself)
 */
forward zp_fw_core_infect_pre(id, attacker)
forward zp_fw_core_cure_pre(id, attacker)

/**
 * Called when a player becomes the last zombie/human.
 *
 * Note: This is called for the first zombie too.
 *
 * @param id		Player index.
 */
forward zp_fw_core_last_zombie(id)
forward zp_fw_core_last_human(id)

/**
 * Called when a player spawns, before applying human/zombie attributes to him.
 *
 * @param id		Player index.
 */
forward zp_fw_core_spawn_post(id)

forward zp_fw_spawn_post_add_bit(iPlayer);
forward zp_fw_kill_pre_bit_sub(iPlayer, iAttacker);