hi i has this plugin, its make last human can be infect and the round will end. you dont have to stab untill he out of hp
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#define PLUGIN "lasthumankill"
#define VERSION "0.1"
#define AUTHOR "Barney"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHam(Ham_TakeDamage, "player", "fw_killlasthuman");
}
public client_putinserver(id)
{
new g_Ham_Bot
if(!g_Ham_Bot && is_user_bot(id))
{
g_Ham_Bot = 1
set_task(0.1, "Do_RegisterHam_Bot", id)
}
}
public Do_RegisterHam_Bot(id)
{
RegisterHamFromEntity(Ham_TakeDamage, id, "fw_killlasthuman")
}
public fw_killlasthuman(victim, inflictor, attacker, Float:damage)
{
if(victim != attacker && is_user_connected(attacker) && zp_get_user_last_human(victim) && zp_get_user_zombie(attacker))
{
zp_infect_user( victim )
zp_set_user_ammo_packs( attacker, zp_get_user_ammo_packs( attacker ) + 2 )
}
}
and this is the error when compile
PHP Code:
// ----------------------------------------
//// lasthumankill.sma
// E:\Me\Counter-Strike Maked\cstrike\addons\amxmodx\scripting\lasthumankill.sma
(36) : error 021: symbol already defined: "zp_infect_user"
//
// 1 Error.
// Could not locate output file compiled\lasthumankill.amx (compile failed).
//
// Compilation Time: 0.09 sec
// ----------------------------------------