lydjjlyd
|
分享:
▲
▼
// Emit Sound Forward public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch) { // 内容限定只对僵尸作用 if (!is_user_connected(id) || !zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclass_ghost) return FMRES_IGNORED; // 僵尸被攻击的叫声 if (equal(sample[7], "bhit", 4)) { if (zp_get_user_nemesis(id)) engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_hurt_female_1.wav", volume, attn, flags, pitch) else engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_hurt_female_2.wav", volume, attn, flags, pitch) return FMRES_SUPERCEDE; } if (equal(sample[8], "kni", 3)) { if (equal(sample[14], "sla", 3)) //手挥空的声音 { engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_swing_1.wav", volume, attn, flags, pitch) return FMRES_SUPERCEDE; } if (equal(sample[14], "hit", 3)) //手抓到物体的声音 { if (sample[17] == 'w') //手抓到墙壁的声音 { engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_wall_3.wav", volume, attn, flags, pitch) return FMRES_SUPERCEDE; } else //手,轻刀击中人的声音 { engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_attack_1.wav", volume, attn, flags, pitch) return FMRES_SUPERCEDE; } } if (equal(sample[14], "sta", 3)) //手,重刀击中人的声音 { engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_attack_2.wav", volume, attn, flags, pitch) return FMRES_SUPERCEDE; } } // 僵尸死亡的声音 if (equal(sample[7], "die", 3) || equal(sample[7], "dea", 3)) { engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_death_female_1.wav", volume, attn, flags, pitch) return FMRES_SUPERCEDE; } // 僵尸摔伤的声音 if (equal(sample[10], "fall", 4)) { engfunc(EngFunc_EmitSound, id, channel, "zombie_plague/zombi_hurt_female_1.wav", volume, attn, flags, pitch) return FMRES_SUPERCEDE; } return FMRES_IGNORED; }
|