AykinDalike大大
你说的 改插件 我不是很懂
在include加入...
#include <amxmod>
这个是一定要的吗.. 因为我看过不少其他插件 都没有用amxmod 反而是用amxmodx ... 真神奇阿
在public plugin_init()加入...
register_event("DeathMsg","headshot","ade","3=1","5=0")
我加成 // Events
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_event("DeathMsg","headshot","ade","3=1","5=0")
对吗..
public的地方加入以下...
public headshot()
{
new killer = read_data(1)
new victim = read_data(2)
new Killer[33]
new Victim[33]
get_user_name(killer, Killer,32)
get_user_name(victim, Victim,32)
if(g_zombie[victim])
{
g_respawn_as_zombie[victim] = false
set_hudmessage( 150, 50, 200, -1.0, 0.25, 1, 0.1, 10.0, 0.1, 0.1, 2)
show_hudmessage(0, "%s killed %s with a headshot", Killer, Victim)
}
return PLUGIN_CONTINUE
}
是加在那里的阿.. 不是很懂喔..
我是加成
public plugin_cfg()
{
// Plugin disabled?
if (!g_pluginenabled) return;
// Get configs dir
new cfgdir[32]
get_configsdir(cfgdir, charsmax(cfgdir))
// Execute config file (zombieplague.cfg)
server_cmd("exec %s/zombieplague.cfg", cfgdir)
// Prevent any more stuff from registering
g_arrays_created = false
// Save customization data
save_customization()
// Lighting task
set_task(5.0, "lighting_effects", _, _, _, "b")
// Cache CVARs after configs are loaded / call roundstart manually
set_task(0.5, "cache_cvars")
set_task(0.5, "event_round_start")
set_task(0.5, "logevent_round_start")
}
public headshot()
{
new killer = read_data(1)
new victim = read_data(2)
new Killer[33]
new Victim[33]
get_user_name(killer, Killer,32)
get_user_name(victim, Victim,32)
if(g_zombie[victim])
{
g_respawn_as_zombie[victim] = false
set_hudmessage( 150, 50, 200, -1.0, 0.25, 1, 0.1, 10.0, 0.1, 0.1, 2)
show_hudmessage(0, "%s killed %s with a headshot", Killer, Victim)
}
return PLUGIN_CONTINUE
}
但是 可以转成amxx 不过进游戏 > 开新游戏 到一半就会卡了
我的zm 是 4.3 改了丧尸被冻结时人类仍然可以攻击
不知有没有关系
希望你可以教一下噜