~幻想恋空~
|
分享:
▲
▼
下面是引用 文♂ 于 2011-09-12 17:29 发表的 :
zp_get_user_zombie(id)是僵尸 !zp_get_user_zombie(id)是人类 我希望你会懂吧 复制程式
if (!g_zombie[id] || g_survivor[id])
{
// Replace these sounds for Survivor only
if (!is_user_connected(id) || !g_zombie[id])
return FMRES_IGNORED;
// Survivor being hit
if (equal(sample[7], "bhit", 4))
{
if (g_survivor[id])
engfunc(EngFunc_EmitSound, id, channel, survivor_pain[random_num(0, sizeof survivor_pain - 1)], volume, attn, flags, pitch)
else
engfunc(EngFunc_EmitSound, id, channel, human_pain[random_num(0, sizeof human_pain - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
但是还是没任何声音是哪个地方做错了... 希望能够直接提供正确答案....
[ 此文章被~幻想恋空~在2011-09-12 19:04重新编辑 ]
|
|
x0
[6 楼]
From:台湾中华电信股份有限公司 | Posted:2011-09-12 18:09 |
|
|
文♂
|
分享:
▲
▼
在 复制程式
new const zombie_fall[][] = { "zombie_plague/zombie_fall1.wav" } 之后加入 复制程式
new const human_pain[][] = { "zombie_plague/zombie_pain1.wav", "zombie_plague/zombie_pain2.wav", "zombie_plague/zombie_pain3.wav", "zombie_plague/zombie_pain4.wav", "zombie_plague/zombie_pain5.wav" }
new const survivor_pain[][] = { "zombie_plague/nemesis_pain1.wav", "zombie_plague/nemesis_pain2.wav", "zombie_plague/nemesis_pain3.wav" }
new const human_die[][] = { "zombie_plague/zombie_die1.wav", "zombie_plague/zombie_die2.wav", "zombie_plague/zombie_die3.wav", "zombie_plague/zombie_die4.wav", "zombie_plague/zombie_die5.wav" }
new const survivor_die[][] = { "zombie_plague/zombie_die1.wav", "zombie_plague/zombie_die2.wav", "zombie_plague/zombie_die3.wav", "zombie_plague/zombie_die4.wav", "zombie_plague/zombie_die5.wav" } 在 复制程式
for (i = 0; i < sizeof zombie_fall; i++)
engfunc(EngFunc_PrecacheSound, zombie_fall[i]) 之后加入 复制程式
for (i = 0; i < sizeof human_pain; i++)
engfunc(EngFunc_PrecacheSound, human_pain[i])
for (i = 0; i < sizeof survivor_pain; i++)
engfunc(EngFunc_PrecacheSound, survivor_pain[i])
for (i = 0; i < sizeof human_die; i++)
engfunc(EngFunc_PrecacheSound, human_die[i])
for (i = 0; i < sizeof survivor_die; i++)
engfunc(EngFunc_PrecacheSound, survivor_die[i])
将 复制程式
public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch) 裹面全部取代为 复制程式
// Emit Sound Forward
public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
{
// Replace these sounds
if (!is_user_connected(id))
return FMRES_IGNORED;
if (g_zombie[id])
{
// Zombie being hit
if (equal(sample[7], "bhit", 4))
{
if (g_nemesis[id])
engfunc(EngFunc_EmitSound, id, channel, nemesis_pain[random_num(0, sizeof nemesis_pain - 1)], volume, attn, flags, pitch)
else
engfunc(EngFunc_EmitSound, id, channel, zombie_pain[random_num(0, sizeof zombie_pain - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
// Zombie attacks with knife
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3)) // slash
{
engfunc(EngFunc_EmitSound, id, channel, zombie_miss_slash[random_num(0, sizeof zombie_miss_slash - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w') // wall
{
engfunc(EngFunc_EmitSound, id, channel, zombie_miss_wall[random_num(0, sizeof zombie_miss_wall - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
else // hit
{
engfunc(EngFunc_EmitSound, id, channel, zombie_hit_normal[random_num(0, sizeof zombie_hit_normal - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3)) // stab
{
engfunc(EngFunc_EmitSound, id, channel, zombie_hit_stab[random_num(0, sizeof zombie_hit_stab - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
// Zombie dies
if (equal(sample[7], "die", 3) || equal(sample[7], "dea", 3))
{
engfunc(EngFunc_EmitSound, id, channel, zombie_die[random_num(0, sizeof zombie_die - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
// Zombie falls off
if (equal(sample[10], "fall", 4))
{
engfunc(EngFunc_EmitSound, id, channel, zombie_fall[random_num(0, sizeof zombie_fall - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
else if (!g_zombie[id])
{
// Human being hit
if (equal(sample[7], "bhit", 4))
{
if (g_survivor[id])
engfunc(EngFunc_EmitSound, id, channel, survivor_pain[random_num(0, sizeof survivor_pain - 1)], volume, attn, flags, pitch)
else
engfunc(EngFunc_EmitSound, id, channel, human_pain[random_num(0, sizeof human_pain - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
// Human dies
if (equal(sample[7], "die", 3) || equal(sample[7], "dea", 3))
{
if (g_survivor[id])
engfunc(EngFunc_EmitSound, id, channel, survivor_die[random_num(0, sizeof survivor_die - 1)], volume, attn, flags, pitch)
else
engfunc(EngFunc_EmitSound, id, channel, human_die[random_num(0, sizeof human_die - 1)], volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
应该可以了~~ 要和佳人外出了....有错等我回来帮你
|
|
x1
[7 楼]
From:香港网上行 | Posted:2011-09-12 18:42 |
|
|
|