Я уже почти все нативы поменял вот этот не могу zp_user_infected_post поменять тк потом зомби класс не работает вот смотри что я уже наделал:
Код:
#include <amxmodx>
#include <fun>
#include <engine>
#include <zp50_ammopacks>
#include <zp50_class_zombie>
#include <zp50_class_nemesis>
#include <zp50_core>
new g_heavy_tank
// Heavy Tank Zombie Attributes
new const zclass_name[] = { "Heavy Tank Zombie" }
new const zclass_info[] = { "HP+++ Knockback-- Speed-" }
new const zclass_model[] = { "zm_witch" }
new const zclass_clawmodel[] = { "v_knife_witch.mdl" }
new KNOCKBOMB_zombieclass1[] = "models/hand/v_witch.mdl"
const zclass_health = 5000
const zclass_speed = 150
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 0.4
public plugin_init()
{
register_event("CurWeapon", "Event_CurrentWeapon", "be", "1=1")
}
public plugin_precache()
{
register_plugin("[ZP] Heavy Tank Zombie", "0.4", "4eRT")
register_cvar("zp_heavy_tank_give_ap", "1")
register_cvar("zp_heavy_tank_give_ap_freq", "30.0")
register_cvar("zp_heavy_tank_give_hp", "5")
register_cvar("zp_heavy_tank_give_hp_freq", "7.0")
g_heavy_tank = zp_class_zombie_register(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)//Регистрируем основу зомби класса
zp_class_zombie_register_kb(g_heavy_tank, zclass_knockback)//Регистрация отскока
zp_class_zombie_register_model(g_heavy_tank, zclass_model)//Регистрация модели
zp_class_zombie_register_claw(g_heavy_tank, zclass_clawmodel)
precache_model(KNOCKBOMB_zombieclass1)
}
public zp_user_infected_post(id, infector)
{
if (zp_class_zombie_get_current(id) == g_heavy_tank)
{
set_task(get_cvar_float("zp_heavy_tank_give_ap_freq"), "AddAP", id, _, _, "b")
set_task(get_cvar_float("zp_heavy_tank_give_hp_freq"), "AddHP", id, _, _, "b")
}
}
public AddAP(id)
{
if (zp_class_zombie_get_current(id) == g_heavy_tank)
{
if (!is_user_alive(id))
return PLUGIN_HANDLED
new user_ap = zp_ammopacks_get(id)
new give_ap = get_cvar_num("zp_heavy_tank_give_ap")
zp_ammopacks_set(id, user_ap + give_ap)
} else {
remove_task(id)
}
return PLUGIN_CONTINUE
}
public AddHP(id)
{
if(zp_class_zombie_get_current(id) == g_heavy_tank)
{
if (!is_user_alive(id))
return PLUGIN_HANDLED
new cur_hp = get_user_health(id)
new am_hp = get_cvar_num("zp_heavy_tank_give_hp")
new max_hp = zp_class_zombie_get_max_health(id, g_heavy_tank)
if (cur_hp < max_hp) {
set_user_health(id, cur_hp + am_hp)
} else {
return PLUGIN_HANDLED
}
} else {
remove_task(id)
}
return PLUGIN_CONTINUE
}
public Event_CurrentWeapon(id)
{
if(!is_user_alive(id)) return
new weaponID = read_data(2)
if (weaponID == CSW_SMOKEGRENADE)if(zp_core_is_zombie(id) && zp_class_zombie_get_current(id) == g_heavy_tank && !zp_class_nemesis_get(id))entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_zombieclass1)
if (weaponID == CSW_FLASHBANG)if(zp_core_is_zombie(id) && zp_class_zombie_get_current(id) == g_heavy_tank && !zp_class_nemesis_get(id))entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_zombieclass1)
}
сама ошибка:
03/31/2015 - 01:31:32: [AMXX] Displaying debug trace (plugin "zp_zclass_heavy_tank.amxx")
03/31/2015 - 01:31:32: [AMXX] Run time error 10: native error (native "zp_class_zombie_get_current")
03/31/2015 - 01:31:32: [AMXX] [0] zp_zclass_heavy_tank.sma::AddAP (line 54)
03/31/2015 - 01:31:34: [ZP] Invalid Player (1)
03/31/2015 - 01:31:34: [AMXX] Displaying debug trace (plugin "zp_zclass_heavy_tank.amxx")
03/31/2015 - 01:31:34: [AMXX] Run time error 10: native error (native "zp_class_zombie_get_current")
03/31/2015 - 01:31:34: [AMXX] [0] zp_zclass_heavy_tank.sma::AddHP (line 72)