|
发表于 2009-2-18 07:29:58
|
显示全部楼层
|阅读模式
来自 中国–广东–广州–白云区
本帖最后由 点通粉丝 于 2009-2-18 23:10 编辑
作者:点通sakulekingz
想法是我今晚提出的
命令
bind [ amx_g1 开
第二条关需要绑定按键才可使用
bind ] amx_g2 关
音乐文件最好选用1.5自带的那样就不用下截啦
有好东西就大伙一起用
/* 鏈彃浠剁敱 EmEditor 涓枃鐗堣嚜鍔ㄧ敓鎴?*/
/* 褰撳墠鏂囦欢浣跨敤 Unicode (UTF-8) 缂栫爜 */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "playsound"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "KIN"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_clcmd("amx_g1","thesound",ADMIN_IMMUNITY,"play the sound")
register_clcmd("amx_g2","stop_thesound",ADMIN_IMMUNITY,"stop the sound")
}
public client_connect(id)
{
client_cmd(id,"bind i amx_g1");
client_cmd(id,"bind o amx_g2");
}
public plugin_precache() {
precache_sound("ambience/lv_jubilee.wav")
}
public thesound(id,level)
{
if (!access(id,level))
{
client_print(id,print_center,"You do't have access !")
return PLUGIN_CONTINUE
}
client_cmd(0,"spk ambience/lv_jubilee,x")
return PLUGIN_CONTINUE
}
public stop_thesound(id,level)
{
if (!access(id,level))
{
client_print(id,print_center,"You do't have access !")
return PLUGIN_CONTINUE
}
client_cmd(0,"stopsound")
return PLUGIN_CONTINUE
} |
|