|
楼主 |
发表于 2006-11-17 18:29:10
|
显示全部楼层
来自 中国–广东–广州–从化区
回复: 怎么往拆C4成功加声效?
Post by pop781
[php]
// 先预缓存声音文件
public plugin_precache()
{
// 例如:
precache_sound("misc/defused.wav")
}
if (BombDefused)
{
announceEvent(defuser, "DEFUSED_BOMB")
// 所有人播放声音
client_cmd(0,"spk misc/defused")
}
[/php] 非常感谢!!
可以完全无错编译通过.
那是否用同样的办法,实现被O4炸死也加声效?
我编译的时候出错了!
AMXX原代码如下:
[PHP]
if (wpnindex == CSW_HEGRENADE && (GrenadeKill || GrenadeSuicide))
{
new killer_name[32], victim_name[32]
get_user_name(killer, killer_name, 31)
get_user_name(victim, victim_name, 31)
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
if (!selfkill)
{
if (GrenadeKill)
ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_HeMessages[random_num(0, 3)], killer_name, victim_name)
}
else if (GrenadeSuicide)
ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_SHeMessages[random_num(0, 3)], victim_name)
}
[/PHP] |
|