~幻想戀空~
|
分享:
▲
▼
下面是引用 文♂ 於 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 |
|
|
|