a23107971a
|
分享:
x0
|
[1.6][插件] 插件做好后转档后游戏发现不在种族中???
(拜托大大帮帮我~)
插件做好后转档后游戏发现不在种族中??? 然后有大大叫我检查50次但我就是看不到拿里出错*.* 拜托大大帮帮我~ ----------------------------------------------------------------------------------------------------------------------------------------
#include <amxmodx> #include <fakemeta> #include <zombieplague> #include <hamsandwich> // Zombie Attributes new const zclass_name[] = { "XX丧尸" } // name new const zclass_info[] = { "X一X段X" } // description new const zclass_model[] = { "zombie_source" } // model new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model const zclass_health = 1000 // health const zclass_speed = 280 // speed const Float:zclass_gravity = 1.0 // gravity const Float:zclass_knockback = 0.8 // knockback new g_zclass_Sharp_edge public plugin_precache() { register_plugin("XX丧尸", "0.0", "a23107971a") g_zclass_Sharp_edge = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) } public plugin_init() { RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage") } public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type) { if (victim == attacker || !is_user_connected(attacker)) //如果攻击者和受伤者是同一人,取消 return HAM_IGNORED if(zp_get_user_zombie(attacker) && !zp_get_user_zombie(victim)) //如果攻击者是'丧尸且受伤者是人类 { damage = (damage * 500000.0) //将原本伤害×500000 SetHamParamFloat(1000000, damage) //将读取被更变后的伤害 } if(get_user_weapon(attacker) == CSW_KNIFE) //如果攻击者是用小刀攻击 SetHamParamFloat(1000000, 25000000) //直接将伤害改成25000000,无论攻击方式和目标受伤位置 return HAM_IGNORED } new Debug public client_putinserver(id) { if(Debug == 1)return new classname[32] pev(id,pev_classname,classname,31) if(!equal(classname,"player")) { Debug=1 set_task(1.0,"_Debug",id) } } public _Debug(id) { RegisterHamFromEntity(Ham_TakeDamage,id,"fw_TakeDamage") } public zp_user_infected_post(id, infector) { if (zp_get_user_zombie_class(id) == g_zclass_Sharp_edge) client_print(id, print_chat, "X所有XX砍XXX吧!") }
|