1.先读取模组
把原本「public plugin_precache()」里的内容换成:
复制程式
public plugin_precache()
{
// Register the new class and store ID for reference
g_zclass_cryptica = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
precache_model("models/zombie_plague/v_knife1_zombie.mdl")
}
2.在每句「show_message_center(id, "隐身指数:??")」下面加入这句:
复制程式
if (get_user_weapon(id) == CSW_KNIFE)
set_pev(id, pev_viewmodel2, "v_knife_zombie.mdl")
或是
复制程式
if (get_user_weapon(id) == CSW_KNIFE)
set_pev(id, pev_viewmodel2, "v_knife1_zombie.mdl")
例如:
复制程式
if (speed_level[id] != 5)
{
fm_set_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha, 130)
speed_level[id] = 5 //设定速度等级为(5)
show_message_center(id, "隐身指数:50") //显示隐身指数为 50 %
if (get_user_weapon(id) == CSW_KNIFE)
set_pev(id, pev_viewmodel2, "v_knife_zombie.mdl")
}
以此类推…
就看你想要隐身指数多少时用哪个模组就怎么加上面那两个…