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吧!") }
|