|
发表于 2004-12-6 12:00:46
|
显示全部楼层
来自 中国–广东–深圳–南山区
做一个插件(EntryPlaySound)。
#include <amxmod>
#define Maxsounds 8
// sounds localized in gcf cache (valve/media)
// you can add more song if you want.
new soundlist[Maxsounds][] = {"Half-Life01","Half-Life02","Half-Life03","Half-Life08","Half-Life11","Half-Life12","Half-Life13","Half-Life17"}
public client_connect(id) {
new i
i = random_num(0,Maxsounds-1)
client_cmd(id,"mp3 loop media/%s",soundlist)
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("EntryPlaySound","0.9","wzl")
return PLUGIN_CONTINUE
}
此插件只能适用于正版用户。但只要修改一下就能for No Steam版的,如:half-life??.mp3放在sound\misc目录下时,就把插件中“media”改为“sound/misc”即可。 |
|