Hello everyone,
i wanted to use Bullet Proof Zombie class for my server, but when i'm want to use it i'm getting error
Code:
[AMXX] Plugin "zp_zclass_bullet_proof.amxx" failed to load: Plugin uses an unknown function (name "zv_register_zombie_class") - check your modules.ini.
What should i do to fix it? Can some one help me?
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <zm_vip>
// Bullet Proof Zombie
new const zclass_name[] = { "Zombie Bullet Proof" }
new const zclass_info[] = { "Only hurts with secondary weapons" }
new const zclass_model[] = { "Bullet_Proof" }
new const zclass_clawmodel[] = { "v_bulletproof_claws.mdl" }
const zclass_health = 1100
const zclass_speed = 350
const Float:zclass_gravity = 0.80
const Float:zclass_knockback = 1.0
new gBulletProof
public plugin_init()
{
register_plugin("[ZP] ZP Class: Bullet Proof", "0.1", "DJHD!")
RegisterHam(Ham_TraceAttack, "player", "fw_Player_TraceAttack")
}
public plugin_precache()
gBulletProof = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
public zp_user_infected_post(id, infector)
{
if (zp_get_user_zombie_class(id) == gBulletProof)
{
if(zp_get_user_nemesis(id))
return
print_chatColor(id, "\g[ZP]\n Remember only you will hurt the secondary weapons.")
}
}
public fw_Player_TraceAttack(iVictim, iAttacker, Float:flDamage, Float:vecDirection[3], iTr, iDamageType)
{
if(!is_user_alive(iVictim) || !is_user_alive(iAttacker))
return HAM_IGNORED;
if(zp_get_user_nemesis(iVictim))
return HAM_IGNORED;
if(zp_get_user_survivor(iAttacker))
return HAM_IGNORED;
if(zp_get_user_zombie_class(iVictim) == gBulletProof)
{
if (get_user_weapon(iAttacker) == CSW_SCOUT || get_user_weapon(iAttacker) == CSW_XM1014
|| get_user_weapon(iAttacker) == CSW_MAC10|| get_user_weapon(iAttacker) == CSW_AUG
|| get_user_weapon(iAttacker) == CSW_UMP45 || get_user_weapon(iAttacker) == CSW_SG550
|| get_user_weapon(iAttacker) == CSW_GALI || get_user_weapon(iAttacker) == CSW_FAMAS
|| get_user_weapon(iAttacker) == CSW_AWP || get_user_weapon(iAttacker) == CSW_MP5NAVY
|| get_user_weapon(iAttacker) == CSW_M249 || get_user_weapon(iAttacker) == CSW_M3
|| get_user_weapon(iAttacker) == CSW_M4A1 || get_user_weapon(iAttacker) == CSW_TMP
|| get_user_weapon(iAttacker) == CSW_G3SG1 || get_user_weapon(iAttacker) == CSW_SG552
|| get_user_weapon(iAttacker) == CSW_AK47 || get_user_weapon(iAttacker) == CSW_P90)
{
new Float:vecEndPos[3]
get_tr2(iTr, TR_vecEndPos, vecEndPos)
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, vecEndPos, 0)
write_byte(TE_SPARKS) // TE iId
engfunc(EngFunc_WriteCoord, vecEndPos[0]) // x
engfunc(EngFunc_WriteCoord, vecEndPos[1]) // y
engfunc(EngFunc_WriteCoord, vecEndPos[2]) // z
message_end()
return HAM_SUPERCEDE;
}
}
return HAM_HANDLED
}
stock print_chatColor(const id, const input[], any:...)
{
new msg[191], players[32], count = 1;
vformat(msg,190,input,3);
replace_all(msg,190,"\g","^4");// green
replace_all(msg,190,"\n","^1");// normal
replace_all(msg,190,"\t","^3");// team
if (id) players[0] = id; else get_players(players,count,"ch");
for (new i=0;i<count;i++)
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang13322\\ f0\\ fs16 \n\\ par }
*/
Original plugin thread:
https://forums.alliedmods.net/showthread.php?t=181260